re PR middle-end/25989 (gomp ICE with -O2 and schedule(guided))
authorJakub Jelinek <jakub@redhat.com>
Mon, 13 Mar 2006 19:36:19 +0000 (20:36 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Mon, 13 Mar 2006 19:36:19 +0000 (20:36 +0100)
PR middle-end/25989
* omp-low.c (expand_omp_for_generic): Mark istart0
and iend0 as addressable.

* gcc.dg/gomp/pr25989.c: New test.

From-SVN: r112023

gcc/ChangeLog
gcc/omp-low.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/gomp/pr25989.c [new file with mode: 0644]

index c5e642c5e1021d0d9858b3f22c34e56b861cb1a3..2d47b362156eb2649e4d2c0530ba321d3ee7abbf 100644 (file)
@@ -1,3 +1,9 @@
+2006-03-13  Jakub Jelinek  <jakub@redhat.com>
+
+       PR middle-end/25989
+       * omp-low.c (expand_omp_for_generic): Mark istart0
+       and iend0 as addressable.
+
 2006-03-13  Jie Zhang  <jie.zhang@analog.com>
 
        * config/bfin/uclinux.h: Define _GNU_SOURCE in CPLUSPLUS_CPP_SPEC.
index 0a9c96fb0de4aeb74e0850e07a59f531cfd1f5f9..65f7151b0cec10908abce0fc05fb963416257a52 100644 (file)
@@ -3,7 +3,7 @@
    marshalling to implement data sharing and copying clauses.
    Contributed by Diego Novillo <dnovillo@redhat.com>
 
-   Copyright (C) 2005 Free Software Foundation, Inc.
+   Copyright (C) 2005, 2006 Free Software Foundation, Inc.
 
 This file is part of GCC.
 
@@ -2430,6 +2430,8 @@ expand_omp_for_generic (struct omp_region *region,
 
   istart0 = create_tmp_var (long_integer_type_node, ".istart0");
   iend0 = create_tmp_var (long_integer_type_node, ".iend0");
+  TREE_ADDRESSABLE (istart0) = 1;
+  TREE_ADDRESSABLE (iend0) = 1;
 
   l0 = create_artificial_label ();
   l1 = create_artificial_label ();
index e998c9d1b0b89690335a9068043a949ca24cb56f..b47252a9bb94c8230cd43a8bc14a77ad39e1abcf 100644 (file)
@@ -1,3 +1,8 @@
+2006-03-13  Jakub Jelinek  <jakub@redhat.com>
+
+       PR middle-end/25989
+       * gcc.dg/gomp/pr25989.c: New test.
+
 2006-03-13  Jeff Law  <law@redhat.com>
 
        * gcc.dg/tree-ssa/20030807-2.c: No longer expected to fail.
diff --git a/gcc/testsuite/gcc.dg/gomp/pr25989.c b/gcc/testsuite/gcc.dg/gomp/pr25989.c
new file mode 100644 (file)
index 0000000..39bd4b7
--- /dev/null
@@ -0,0 +1,16 @@
+/* PR middle-end/25989 */
+/* { dg-do compile } */
+/* { dg-options "-O2 -fopenmp" } */
+
+int
+main (void)
+{
+  int i, j;
+  float a, b = 1.0;
+
+#pragma omp parallel for schedule(guided,1) private(j)
+  for (i = 1; i <= 9; i++)
+    for (j = 1; j <= 9; j++)
+      a = b;
+  return 0;
+}