modernc.org/ccgo/v3@v3.16.14/lib/testdata/gcc-9.1.0/gcc/testsuite/gcc.c-torture/execute/strct-pack-1.c (about) 1 typedef struct 2 { 3 short s __attribute__ ((aligned(2), packed)); 4 double d __attribute__ ((aligned(2), packed)); 5 } TRIAL; 6 7 int 8 check (TRIAL *t) 9 { 10 if (t->s != 1 || t->d != 16.0) 11 return 1; 12 return 0; 13 } 14 15 main () 16 { 17 TRIAL trial; 18 19 trial.s = 1; 20 trial.d = 16.0; 21 22 if (check (&trial) != 0) 23 abort (); 24 exit (0); 25 }