re PR middle-end/58257 (Bogus warning with OpenMP collapsed loops)

PR middle-end/58257
	* omp-low.c (copy_var_decl): Copy over TREE_NO_WARNING flag.

	* c-c++-common/gomp/pr58257.c: New test.

From-SVN: r202049
This commit is contained in:
Jakub Jelinek 2013-08-28 12:08:59 +02:00 committed by Jakub Jelinek
parent 12211b99fe
commit 4b128ece06
4 changed files with 26 additions and 0 deletions

View File

@ -1,3 +1,8 @@
2013-08-28 Jakub Jelinek <jakub@redhat.com>
PR middle-end/58257
* omp-low.c (copy_var_decl): Copy over TREE_NO_WARNING flag.
2013-08-28 Jan Hubicka <jh@suse.cz>
* builtins.def (free): Declare leaf.

View File

@ -850,6 +850,7 @@ copy_var_decl (tree var, tree name, tree type)
DECL_ARTIFICIAL (copy) = DECL_ARTIFICIAL (var);
DECL_IGNORED_P (copy) = DECL_IGNORED_P (var);
DECL_CONTEXT (copy) = DECL_CONTEXT (var);
TREE_NO_WARNING (copy) = TREE_NO_WARNING (var);
TREE_USED (copy) = 1;
DECL_SEEN_IN_BIND_EXPR_P (copy) = 1;

View File

@ -1,3 +1,8 @@
2013-08-28 Jakub Jelinek <jakub@redhat.com>
PR middle-end/58257
* c-c++-common/gomp/pr58257.c: New test.
2013-08-28 Richard Biener <rguenther@suse.de>
PR tree-optimization/56933

View File

@ -0,0 +1,15 @@
/* PR middle-end/58257 */
/* { dg-do compile } */
/* { dg-options "-O2 -fopenmp -Wall" } */
int
foo (int n)
{
int a[10][10];
int x, y;
#pragma omp parallel for collapse(2) /* { dg-bogus "may be used uninitialized in this function" } */
for (x = 0; x < n; x++) /* { dg-bogus "may be used uninitialized in this function" } */
for (y = 0; y < n; y++)
a[x][y] = x + y * y;
return a[0][0];
}