PR c++/91110
* decl2.c (cp_omp_mappable_type_1): Don't emit any note for
error_mark_node type.
* g++.dg/gomp/pr91110.C: New test.
From-SVN: r273248
+2019-07-08 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/91110
+ * decl2.c (cp_omp_mappable_type_1): Don't emit any note for
+ error_mark_node type.
+
2019-07-05 Jakub Jelinek <jakub@redhat.com>
PR c++/67184
/* Mappable type has to be complete. */
if (type == error_mark_node || !COMPLETE_TYPE_P (type))
{
- if (notes)
+ if (notes && type != error_mark_node)
{
tree decl = TYPE_MAIN_DECL (type);
inform ((decl ? DECL_SOURCE_LOCATION (decl) : input_location),
+2019-07-08 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/91110
+ * g++.dg/gomp/pr91110.C: New test.
+
2019-07-08 Segher Boessenkool <segher@kernel.crashing.org>
PR rtl-optimization/88233
--- /dev/null
+// PR c++/91110
+// { dg-do compile }
+
+void
+foo ()
+{
+ X b[2]; // { dg-error "'X' was not declared in this scope" }
+ b[0] = 1; // { dg-error "'b' was not declared in this scope" }
+ #pragma omp target map(to: b) // { dg-error "'b' does not have a mappable type in 'map' clause" }
+ ;
+}