1 /* Test for handling of tags. A struct defined in an inner scope does 2 not match one declared in an outer scope. */ 3 /* Origin: Joseph Myers <jsm@polyomino.org.uk> */ 4 /* { dg-do compile } */ 5 /* { dg-options "-std=iso9899:1999 -pedantic-errors" } */ 6 7 struct s; 8 struct t { struct s *p; } x; 9 10 void f(void)11f (void) 12 { 13 /* This is a different struct s from the outer one. */ 14 struct s { int a; } y; 15 x.p = &y; /* { dg-error "incompatible" } */ 16 } 17