annotate gcc/testsuite/gcc.dg/parm-impl-decl-1.c @ 145:1830386684a0

gcc-9.2.0
author anatofuz
date Thu, 13 Feb 2020 11:34:05 +0900
parents 04ced10e8804
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111
kono
parents:
diff changeset
1 /* Test implicit function declarations and other odd declarations in
kono
parents:
diff changeset
2 function prototypes. Bug 18239. */
kono
parents:
diff changeset
3 /* Origin: Joseph Myers <joseph@codesourcery.com> */
kono
parents:
diff changeset
4 /* { dg-do compile } */
kono
parents:
diff changeset
5 /* { dg-options "-std=gnu89" } */
kono
parents:
diff changeset
6
kono
parents:
diff changeset
7 /* Implicit function declaration in attribute in definition (testcase
kono
parents:
diff changeset
8 from bug). */
kono
parents:
diff changeset
9 int
kono
parents:
diff changeset
10 foo (int __attribute__ ((__mode__ (vector_size(8)))) i) /* { dg-warning "'mode' attribute ignored" } */
kono
parents:
diff changeset
11 {
kono
parents:
diff changeset
12 return (long long) i;
kono
parents:
diff changeset
13 }
kono
parents:
diff changeset
14
kono
parents:
diff changeset
15 /* Various other cases. */
kono
parents:
diff changeset
16
kono
parents:
diff changeset
17 int f (int [sizeof(g())]);
kono
parents:
diff changeset
18 int f1 (int [sizeof(g1())]);
kono
parents:
diff changeset
19
kono
parents:
diff changeset
20 int g () { return 1; }
kono
parents:
diff changeset
21
kono
parents:
diff changeset
22 int
kono
parents:
diff changeset
23 h (int (*p)[sizeof(i())])
kono
parents:
diff changeset
24 {
kono
parents:
diff changeset
25 int g2 (), g3 ();
kono
parents:
diff changeset
26 return (*p)[0] + g3() + g2();
kono
parents:
diff changeset
27 }
kono
parents:
diff changeset
28
kono
parents:
diff changeset
29 int i () { return 2; }
kono
parents:
diff changeset
30
kono
parents:
diff changeset
31 int f2 (int [sizeof(g2())]);
kono
parents:
diff changeset
32 int f3 (int [sizeof(g3())]);
kono
parents:
diff changeset
33 int g3 () { return 4; }