Commit 156030d3 by Jakub Jelinek Committed by Jakub Jelinek

re PR c/51339 (ICE: in convert_move, at expr.c:326 with -fopenmp and parallel for)

	PR c/51339
	* c-decl.c (c_finish_incomplete_decl, finish_decl): Call
	relayout_decl instead of layout_decl.

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

From-SVN: r182026
parent a9eba00e
2011-12-05 Jakub Jelinek <jakub@redhat.com>
PR c/51339
* c-decl.c (c_finish_incomplete_decl, finish_decl): Call
relayout_decl instead of layout_decl.
2011-12-05 Richard Sandiford <rdsandiford@googlemail.com>
* resource.c (init_resource_info): Only consider EXIT_IGNORE_STACK
......@@ -719,7 +719,7 @@ c_finish_incomplete_decl (tree decl)
complete_array_type (&TREE_TYPE (decl), NULL_TREE, true);
layout_decl (decl, 0);
relayout_decl (decl);
}
}
}
......@@ -4311,7 +4311,7 @@ finish_decl (tree decl, location_t init_loc, tree init,
if (DECL_INITIAL (decl))
TREE_TYPE (DECL_INITIAL (decl)) = type;
layout_decl (decl, 0);
relayout_decl (decl);
}
if (TREE_CODE (decl) == VAR_DECL)
......
2011-12-05 Jakub Jelinek <jakub@redhat.com>
PR c/51339
* gcc.dg/gomp/pr51339.c: New test.
2011-12-05 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/51399
......
/* PR c/51339 */
/* { dg-do compile } */
/* { dg-options "-fopenmp" } */
char g[] = "g";
void
foo (void)
{
#pragma omp parallel sections firstprivate (g) lastprivate (g)
{
#pragma omp section
g[0] = 'h';
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment