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.
* gcc.dg/gomp/pr51339.c: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_6-branch@182113
138bc75d-0d04-0410-961f-
82ee72b054a4
Backport from mainline
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 Jakub Jelinek <jakub@redhat.com>
Eric Botcazou <ebotcazou@adacore.com>
PR middle-end/51323
complete_array_type (&TREE_TYPE (decl), NULL_TREE, true);
- layout_decl (decl, 0);
+ relayout_decl (decl);
}
}
}
if (DECL_INITIAL (decl))
TREE_TYPE (DECL_INITIAL (decl)) = type;
- layout_decl (decl, 0);
+ relayout_decl (decl);
}
if (TREE_CODE (decl) == VAR_DECL)
Backport from mainline
2011-12-05 Jakub Jelinek <jakub@redhat.com>
+
+ PR c/51339
+ * gcc.dg/gomp/pr51339.c: New test.
+
+ 2011-12-05 Jakub Jelinek <jakub@redhat.com>
Eric Botcazou <ebotcazou@adacore.com>
PR middle-end/51323
--- /dev/null
+/* 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';
+ }
+}