]> gcc.gnu.org Git - gcc.git/commitdiff
re PR tree-optimization/57185 (ICE: Segmentation fault in add_field_for_reduction...
authorRichard Biener <rguenther@suse.de>
Mon, 6 May 2013 15:06:41 +0000 (15:06 +0000)
committerRichard Biener <rguenth@gcc.gnu.org>
Mon, 6 May 2013 15:06:41 +0000 (15:06 +0000)
2013-05-06  Richard Biener  <rguenther@suse.de>

PR tree-optimization/57185
* tree-parloops.c (add_field_for_reduction): Handle anonymous
SSA names properly.

* gcc.dg/autopar/pr57185.c: New testcase.

From-SVN: r198630

gcc/ChangeLog
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/autopar/pr57185.c [new file with mode: 0644]
gcc/tree-parloops.c

index 6621de19a645efc4cc8d9268ef574f6e5dcb1bc5..def2c1e221972d430a680a5113ab006ea28a23ba 100644 (file)
@@ -1,3 +1,9 @@
+2013-05-06  Richard Biener  <rguenther@suse.de>
+
+       PR tree-optimization/57185
+       * tree-parloops.c (add_field_for_reduction): Handle anonymous
+       SSA names properly.
+
 2013-05-06  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
 
        * gimple-ssa-strength-reduction.c (slsr_process_phi): Re-enable.
index a3b6da7175709169879e9b9c3e969ac1860d1789..a7ac2db4daa403553dd283ed022084aaec2b0da6 100644 (file)
@@ -1,3 +1,8 @@
+2013-05-06  Richard Biener  <rguenther@suse.de>
+
+       PR tree-optimization/57185
+       * gcc.dg/autopar/pr57185.c: New testcase.
+
 2013-05-06  Bill Schmidt  <wschmidt@linux.vnet.ibm.com>
 
        * gcc.dg/tree-ssa/slsr-32.c: Re-enable.
diff --git a/gcc/testsuite/gcc.dg/autopar/pr57185.c b/gcc/testsuite/gcc.dg/autopar/pr57185.c
new file mode 100644 (file)
index 0000000..b465757
--- /dev/null
@@ -0,0 +1,29 @@
+/* { dg-do compile } */
+/* { dg-options "-O3 -ftree-parallelize-loops=2 -fipa-pta" } */
+
+int a, b;
+int *d;
+void f(void)
+{
+  int c;
+  b %= 1;
+
+  if(1 - (b < 1))
+    {
+      int *q = 0;
+
+      if(a)
+       {
+         c = 0;
+lbl:
+         for(*d; *d; ++*d)
+           if(c ? : a ? : (c = 1) ? : 0)
+             *q &= 1;
+         return;
+       }
+
+      q = (int *)1;
+    }
+  goto lbl;
+}
+
index 4a4b02b161c5ab87c029ab98dfdfa56bc944310a..cea6f030c0ac8505a81ffb49ed973e7a86d52feb 100644 (file)
@@ -964,9 +964,9 @@ add_field_for_reduction (reduction_info **slot, tree type)
 {
 
   struct reduction_info *const red = *slot;
-  tree var = SSA_NAME_VAR (gimple_assign_lhs (red->reduc_stmt));
-  tree field = build_decl (gimple_location (red->reduc_stmt),
-                          FIELD_DECL, DECL_NAME (var), TREE_TYPE (var));
+  tree var = gimple_assign_lhs (red->reduc_stmt);
+  tree field = build_decl (gimple_location (red->reduc_stmt), FIELD_DECL,
+                          SSA_NAME_IDENTIFIER (var), TREE_TYPE (var));
 
   insert_field_into_struct (type, field);
 
This page took 0.080412 seconds and 5 git commands to generate.