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
This commit is contained in:
Jakub Jelinek 2006-05-16 12:12:39 +02:00 committed by Jakub Jelinek
parent 726e99922b
commit 4156f84bfb
5 changed files with 38 additions and 1 deletions

View File

@ -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

View File

@ -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))

View File

@ -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

View File

@ -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);
}

View File

@ -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);
}