1*f4a2713aSLionel Sambuc // RUN: %clang_cc1 %s -verify -fsyntax-only 2*f4a2713aSLionel Sambuc 3*f4a2713aSLionel Sambuc struct simple { int i; }; 4*f4a2713aSLionel Sambuc f(void)5*f4a2713aSLionel Sambucvoid f(void) { 6*f4a2713aSLionel Sambuc struct simple s[1]; 7*f4a2713aSLionel Sambuc s->i = 1; 8*f4a2713aSLionel Sambuc } 9*f4a2713aSLionel Sambuc 10*f4a2713aSLionel Sambuc typedef int x; 11*f4a2713aSLionel Sambuc struct S { 12*f4a2713aSLionel Sambuc int x; 13*f4a2713aSLionel Sambuc x z; 14*f4a2713aSLionel Sambuc }; 15*f4a2713aSLionel Sambuc g(void)16*f4a2713aSLionel Sambucvoid g(void) { 17*f4a2713aSLionel Sambuc struct S s[1]; 18*f4a2713aSLionel Sambuc s->x = 1; 19*f4a2713aSLionel Sambuc s->z = 2; 20*f4a2713aSLionel Sambuc } 21*f4a2713aSLionel Sambuc PR17762(struct simple c)22*f4a2713aSLionel Sambucint PR17762(struct simple c) { 23*f4a2713aSLionel Sambuc return c->i; // expected-error {{member reference type 'struct simple' is not a pointer; maybe you meant to use '.'?}} 24*f4a2713aSLionel Sambuc } 25