* testsuite/libgomp.fortran/vla7.f90: Add -w to options.
[official-gcc.git] / gcc / testsuite / gcc.dg / comp-return-1.c
blob82c398355d0f472e1c3262e8e4c5ec520c2dd45e
1 /* When merging a nonprototype definition of a function with a prior
2 prototype declaration, the composite type of the return types must
3 be formed rather than just copying the function type. */
4 /* Origin: Joseph Myers <jsm@polyomino.org.uk> */
5 /* { dg-do compile } */
7 typedef int a[];
8 typedef int a5[5];
9 typedef int a10[10];
11 a *f1 ();
12 a5 *f1 () { return 0; }
14 a *f2 (void);
15 a5 *f2 () { return 0; }
17 a *f3 ();
18 a5 *f3 (void) { return 0; }
20 a *f4 (void);
21 a5 *f4 (void) { return 0; }
23 void
24 g (void)
26 a10 *x;
27 x = f1 (); /* { dg-error "incompatible" "f1" } */
28 x = f2 (); /* { dg-error "incompatible" "f2" } */
29 x = f3 (); /* { dg-error "incompatible" "f3" } */
30 x = f4 (); /* { dg-error "incompatible" "f4" } */