diff options
author | Jakub Jelinek <jakub@redhat.com> | 2006-05-16 12:12:39 +0200 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2006-05-16 12:12:39 +0200 |
commit | 4156f84bfb9e0e26701a825d52da11eec26d10ff (patch) | |
tree | d91b1027fa1d8ccd64127b7bbcfbfc90a4ea9c55 | |
parent | 726e99922bf44d24b991b6a9454461d22ba03827 (diff) | |
download | gcc-4156f84bfb9e0e26701a825d52da11eec26d10ff.zip gcc-4156f84bfb9e0e26701a825d52da11eec26d10ff.tar.gz gcc-4156f84bfb9e0e26701a825d52da11eec26d10ff.tar.bz2 |
re PR c/27499 (ICE with unsigned iteration variable and -fopenmp)
PR c/27499
* gimplify.c (gimplify_omp_for): Remove assertion that iteration var
is signed.
* gcc.dg/gomp/pr27499.c: New test.
* g++.dg/gomp/pr27499.C: New test.
From-SVN: r113822
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/gimplify.c | 1 | ||||
-rw-r--r-- | gcc/testsuite/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/testsuite/g++.dg/gomp/pr27499.C | 13 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/gomp/pr27499.c | 13 |
5 files changed, 38 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 5dc5511..865fb6a 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2006-05-16 Jakub Jelinek <jakub@redhat.com> + + PR c/27499 + * gimplify.c (gimplify_omp_for): Remove assertion that iteration var + is signed. + 2006-05-16 Andreas Schwab <schwab@suse.de> * doc/tm.texi (TARGET_LIBGCC_SDATA_SECTION): Add missing @end diff --git a/gcc/gimplify.c b/gcc/gimplify.c index 000f610..279bd2b 100644 --- a/gcc/gimplify.c +++ b/gcc/gimplify.c @@ -4750,7 +4750,6 @@ gimplify_omp_for (tree *expr_p, tree *pre_p) decl = TREE_OPERAND (t, 0); gcc_assert (DECL_P (decl)); gcc_assert (INTEGRAL_TYPE_P (TREE_TYPE (decl))); - gcc_assert (!TYPE_UNSIGNED (TREE_TYPE (decl))); /* Make sure the iteration variable is private. */ if (omp_is_private (gimplify_omp_ctxp, decl)) diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index ce8b924..e9f17325 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2006-05-16 Jakub Jelinek <jakub@redhat.com> + + PR c/27499 + * gcc.dg/gomp/pr27499.c: New test. + * g++.dg/gomp/pr27499.C: New test. + 2006-05-15 Mark Mitchell <mark@codesourcery.com> PR c++/27339 diff --git a/gcc/testsuite/g++.dg/gomp/pr27499.C b/gcc/testsuite/g++.dg/gomp/pr27499.C new file mode 100644 index 0000000..293ef8f --- /dev/null +++ b/gcc/testsuite/g++.dg/gomp/pr27499.C @@ -0,0 +1,13 @@ +// PR c/27499 +// { dg-do compile } + +extern void bar (unsigned int); + +void +foo (void) +{ + unsigned int i; +#pragma omp for + for (i = 0; i < 64; ++i) // { dg-warning "is unsigned" } + bar (i); +} diff --git a/gcc/testsuite/gcc.dg/gomp/pr27499.c b/gcc/testsuite/gcc.dg/gomp/pr27499.c new file mode 100644 index 0000000..e8c1db4 --- /dev/null +++ b/gcc/testsuite/gcc.dg/gomp/pr27499.c @@ -0,0 +1,13 @@ +/* PR c/27499 */ +/* { dg-do compile } */ + +extern void bar (unsigned int); + +void +foo (void) +{ + unsigned int i; +#pragma omp parallel for + for (i = 0; i < 64; ++i) /* { dg-warning "is unsigned" } */ + bar (i); +} |