@@ -13035,7 +13035,7 @@ c_parser_omp_variable_list (c_parser *parser,
{
location_t op_loc = c_parser_peek_token (parser)->location;
if (c_parser_next_token_is (parser, CPP_DEREF))
- t = build_simple_mem_ref (t);
+ t = build_indirect_ref (op_loc, t, RO_ARROW);
c_parser_consume_token (parser);
if (!c_parser_next_token_is (parser, CPP_NAME))
{
new file mode 100644
@@ -0,0 +1,17 @@
+/* { dg-do compile } */
+
+struct t { int *p; };
+
+void foo () {
+ struct t s;
+ #pragma omp target map(to: s->p) /* { dg-error "invalid type argument of '->' \\(have 'struct t'\\)" "" { target c } } */
+ /* { dg-error "base operand of '->' has non-pointer type 't'" "" { target c++ } .-1 } */
+ {
+ }
+}
+
+int main (int argc, char *argv[])
+{
+ foo ();
+ return 0;
+}