2011-04-07 Jakub Jelinek <jakub@redhat.com>
Backported from mainline
+ 2011-03-03 Jakub Jelinek <jakub@redhat.com>
+
+ PR c/47963
+ * gimplify.c (omp_add_variable): Only call omp_notice_variable
+ on TYPE_SIZE_UNIT if it is a DECL.
+
2011-02-19 Jakub Jelinek <jakub@redhat.com>
PR c/47809
For local variables TYPE_SIZE_UNIT might not be gimplified yet,
in this case omp_notice_variable will be called later
on when it is gimplified. */
- else if (! (flags & GOVD_LOCAL))
+ else if (! (flags & GOVD_LOCAL)
+ && DECL_P (TYPE_SIZE_UNIT (TREE_TYPE (decl))))
omp_notice_variable (ctx, TYPE_SIZE_UNIT (TREE_TYPE (decl)), true);
}
else if (lang_hooks.decls.omp_privatize_by_reference (decl))
2011-04-07 Jakub Jelinek <jakub@redhat.com>
Backported from mainline
+ 2011-03-03 Jakub Jelinek <jakub@redhat.com>
+
+ PR c/47963
+ * gcc.dg/gomp/pr47963.c: New test.
+ * g++.dg/gomp/pr47963.C: New test.
+
2011-02-19 Jakub Jelinek <jakub@redhat.com>
PR c/47809
--- /dev/null
+// PR c/47963
+// { dg-do compile }
+// { dg-options "-fopenmp" }
+
+void
+foo (float n)
+{
+ int A[n][n]; // { dg-error "has non-integral type" }
+#pragma omp parallel private(A)
+ ;
+}
--- /dev/null
+/* PR c/47963 */
+/* { dg-do compile } */
+/* { dg-options "-fopenmp" } */
+
+void
+foo (float n)
+{
+ int A[n][n]; /* { dg-error "has non-integer type" } */
+#pragma omp parallel private(A)
+ ;
+}