Implement C _FloatN, _FloatNx types.
[official-gcc.git] / gcc / testsuite / gcc.dg / 20020527-1.c
blob6f963ed9f78995b3688dc40d6528db2cdc309dc6
1 /* PR c/6660
2 Test whether an unnamed field with user defined type - struct or union is
3 accepted. */
4 /* { dg-do compile } */
5 /* { dg-options "-fms-extensions" } */
7 typedef struct {
8 unsigned short a;
9 unsigned short b;
10 } __attribute__ ((__packed__)) A;
12 typedef struct B_ {
13 unsigned int c;
14 unsigned int d;
15 } B;
17 typedef struct C_ {
19 unsigned int e;
20 unsigned int f;
21 } C;
23 typedef C D;
25 typedef struct {
28 struct {
29 unsigned short g;
30 unsigned short h;
31 } __attribute__ ((__packed__));
32 union {
33 int i;
34 long j;
36 int k;
37 } __attribute__ ((__packed__)) E;
39 E x;
41 void foo (void)
43 x.a = 1;
44 x.b = 2;
45 x.c = 3;
46 x.d = 4;
47 x.e = 5;
48 x.f = 6;
49 x.g = 7;
50 x.h = 8;
51 x.i = 9;
52 x.j = 10;
53 x.k = 11;