annotate gcc/testsuite/gcc.dg/anon-struct-3.c @ 111:04ced10e8804

gcc 7
author kono
date Fri, 27 Oct 2017 22:46:09 +0900
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
111
kono
parents:
diff changeset
1 /* { dg-options "-std=gnu89 -fms-extensions" } */
kono
parents:
diff changeset
2 /* Enabling Microsoft mode makes all of the tests equivalent. Checked vs
kono
parents:
diff changeset
3 Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 12.00.8168 for 80x86
kono
parents:
diff changeset
4 */
kono
parents:
diff changeset
5
kono
parents:
diff changeset
6 struct A { char a; };
kono
parents:
diff changeset
7
kono
parents:
diff changeset
8 struct B {
kono
parents:
diff changeset
9 struct A;
kono
parents:
diff changeset
10 char b;
kono
parents:
diff changeset
11 };
kono
parents:
diff changeset
12 char testB[sizeof(struct B) == 2 * sizeof(struct A) ? 1 : -1];
kono
parents:
diff changeset
13
kono
parents:
diff changeset
14 struct C {
kono
parents:
diff changeset
15 struct D { char d; };
kono
parents:
diff changeset
16 char c;
kono
parents:
diff changeset
17 };
kono
parents:
diff changeset
18 char testC[sizeof(struct C) == 2 * sizeof(struct A) ? 1 : -1];
kono
parents:
diff changeset
19 char testD[sizeof(struct D) == sizeof(struct A) ? 1 : -1];
kono
parents:
diff changeset
20
kono
parents:
diff changeset
21 struct E {
kono
parents:
diff changeset
22 struct { char z; };
kono
parents:
diff changeset
23 char e;
kono
parents:
diff changeset
24 };
kono
parents:
diff changeset
25 char testE[sizeof(struct E) == 2 * sizeof(struct A) ? 1 : -1];
kono
parents:
diff changeset
26
kono
parents:
diff changeset
27 typedef struct A typedef_A;
kono
parents:
diff changeset
28 struct F {
kono
parents:
diff changeset
29 typedef_A;
kono
parents:
diff changeset
30 char f;
kono
parents:
diff changeset
31 };
kono
parents:
diff changeset
32 char testF[sizeof(struct F) == 2 * sizeof(struct A) ? 1 : -1];