1 /*****************************************************************************/
2 /* test 'nodata_wanted' data output suppression */
4 #if defined test_static_data_error
7 static short w
= (int)&foo
; /* initializer not computable */
11 #elif defined test_static_nodata_error
14 static short w
= (int)&foo
; /* initializer not computable */
18 #elif defined test_global_data_error
20 static short w
= (int)&foo
; /* initializer not computable */
23 #elif defined test_local_data_noerror
25 short w
= &foo
; /* 2 cast warnings */
28 #elif defined test_data_suppression
31 #define ASMLABELS(s) \
32 __asm__(".global d"#s",t"#s"\n.data\nd"#s":\n.text\nt"#s":\n")
35 static void *p = (void*)&main;\
36 static char cc[] = "static string";\
37 static double d = 8.0;\
38 static struct __attribute__((packed)) {\
41 unsigned z : 28, a: 4, b: 5;\
42 } s = { 0x333,0x44,0x555555,6,7 };\
43 printf(" static data: %d - %.1f - %.1f - %s - %s\n",\
44 sizeof 8.0, 8.0, d, __FUNCTION__, cc);\
45 printf(" static bitfields: %x %x %x %x %x\n", s.x, s.y, s.z, s.a, s.b);
49 extern char ds1
[],ts1
[];
50 extern char ds2
[],ts2
[];
51 extern char de1
[],te1
[];
52 extern char de2
[],te2
[];
54 printf("suppression off\n");
60 printf(" data length is %s\n", de1
- ds1
? "not 0":"0");
61 printf(" text length is %s\n", te1
- ts1
? "not 0":"0");
63 printf("suppression on\n");
69 printf(" data length is %x\n", de2
- ds2
);
70 printf(" text length is %X\n", te2
- ts2
);