re PR target/65508 (ICE: in initialize_inlined_parameters, at tree-inline.c:3305...
authorIlya Enkovich <ilya.enkovich@intel.com>
Wed, 25 Mar 2015 12:41:27 +0000 (12:41 +0000)
committerIlya Enkovich <ienkovich@gcc.gnu.org>
Wed, 25 Mar 2015 12:41:27 +0000 (12:41 +0000)
gcc/

PR target/65508
* tree-chkp.c (chkp_add_bounds_to_call_stmt): Set static
chain for generated call.

gcc/testsuite/

PR target/65508
* gcc.target/i386/mpx/pr65508.c: New.

From-SVN: r221661

gcc/ChangeLog
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/i386/mpx/pr65508.c [new file with mode: 0644]
gcc/tree-chkp.c

index b4c8aff8cb2b6334d0582f2aa03eac6cc84bb6c1..fbef8a1f7e1eda82ba224fb85f0f8eeec69855af 100644 (file)
@@ -1,3 +1,9 @@
+2015-03-25  Ilya Enkovich  <ilya.enkovich@intel.com>
+
+       PR target/65508
+       * tree-chkp.c (chkp_add_bounds_to_call_stmt): Set static
+       chain for generated call.
+
 2015-03-25  Richard Biener  <rguenther@suse.de>
 
        * passes.c (pass_manager::execute_early_local_passes): Guard
index cf3b288b06452d333e3ead592e609a5b7a7380cc..f92db23395c6947824086106484b652911153489 100644 (file)
@@ -1,3 +1,8 @@
+2015-03-25  Ilya Enkovich  <ilya.enkovich@intel.com>
+
+       PR target/65508
+       * gcc.target/i386/mpx/pr65508.c: New.
+
 2015-03-25  Mikael Morin  <mikael@gcc.gnu.org>
 
        PR fortran/64952
diff --git a/gcc/testsuite/gcc.target/i386/mpx/pr65508.c b/gcc/testsuite/gcc.target/i386/mpx/pr65508.c
new file mode 100644 (file)
index 0000000..9060287
--- /dev/null
@@ -0,0 +1,12 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fcheck-pointer-bounds -mmpx" } */
+
+void
+bar (int N)
+{
+  int a[N];
+  void foo (int a[N])
+  {
+  }
+  foo (a);
+}
index 977c460b60fe37c2ab43f9730ccd1fb6af05b416..03f75b35da84d209929d8f89112ab1e48e10abe6 100644 (file)
@@ -1838,6 +1838,7 @@ chkp_add_bounds_to_call_stmt (gimple_stmt_iterator *gsi)
       new_call = gimple_build_call_vec (gimple_op (call, 1), new_args);
       gimple_call_set_lhs (new_call, gimple_call_lhs (call));
       gimple_call_copy_flags (new_call, call);
+      gimple_call_set_chain (new_call, gimple_call_chain (call));
     }
   new_args.release ();