Debian Codegraph @

gcc/testsuite/gcc.dg/debug/dwarf2/sso-2.c

raw
1 /* { dg-do compile } */
2 /* { dg-options "-gdwarf-3 -dA" } */
3
4 #if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
5 #define REVERSE_SSO __attribute__((scalar_storage_order("big-endian")));
6 #else
7 #define REVERSE_SSO __attribute__((scalar_storage_order("little-endian")));
8 #endif
9
10 struct reverse
11 {
12 int i;
13 short a[4];
14 } REVERSE_SSO;
15
16 struct native
17 {
18 int i;
19 short a[4];
20 };
21
22 struct reverse R;
23 struct native N;
24
25 /* Verify that we have endianity on the common base type of 'i' and the
26 * element of 'a' in the first 2 structures. */
27 /* { dg-final { scan-assembler-times " DW_AT_endianity" 2 } } */
28 /* { dg-final { scan-assembler-times "DIE \\(\[0-9a-z\]*\\) DW_TAG_base_type" 5 } } */