diff options
author | Dimitar Dimitrov <dimitar@dinux.eu> | 2022-04-22 20:27:22 +0300 |
---|---|---|
committer | Dimitar Dimitrov <dimitar@dinux.eu> | 2022-06-26 20:32:19 +0300 |
commit | d230906bf692d1f723fe0f21672bed70f73673fa (patch) | |
tree | 36e9b7ec2cbc10ad3b82dc4cdcf548e659ac2a4f | |
parent | 80ace9185dc534e4d6cb19506300c4fcad4bd916 (diff) | |
download | gcc-d230906bf692d1f723fe0f21672bed70f73673fa.zip gcc-d230906bf692d1f723fe0f21672bed70f73673fa.tar.gz gcc-d230906bf692d1f723fe0f21672bed70f73673fa.tar.bz2 |
testsuite: Adjust btf-bitfields-1.c for default_packed
If target packs structures by default, the bitfield offset which the
test validates must be adjusted to not include padding.
gcc/testsuite/ChangeLog:
* gcc.dg/debug/btf/btf-bitfields-1.c: Adjust the checked offsets
for targets which pack structures by default.
Signed-off-by: Dimitar Dimitrov <dimitar@dinux.eu>
-rw-r--r-- | gcc/testsuite/gcc.dg/debug/btf/btf-bitfields-1.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/gcc/testsuite/gcc.dg/debug/btf/btf-bitfields-1.c b/gcc/testsuite/gcc.dg/debug/btf/btf-bitfields-1.c index 3ee07dd..793b4c8 100644 --- a/gcc/testsuite/gcc.dg/debug/btf/btf-bitfields-1.c +++ b/gcc/testsuite/gcc.dg/debug/btf/btf-bitfields-1.c @@ -5,7 +5,8 @@ (bit_size << 24) | bit_offset - (0xa << 24) | 0x20 - (0x7 << 24) | 0x2a - - (0x13 << 24) | 0x40 - note that this is aligned to 0x40. */ + - (0x13 << 24) | 0x40 - note that this is aligned to 0x40. + - (0x13 << 24) | 0x31 - in case structures are packed. */ /* { dg-do compile ) */ /* { dg-options "-O0 -gbtf -dA" } */ @@ -15,7 +16,8 @@ /* { dg-final { scan-assembler-times "\[\t \]0xa000020\[\t \]+\[^\n\]*btm_offset" 1 } } */ /* { dg-final { scan-assembler-times "\[\t \]0x700002a\[\t \]+\[^\n\]*btm_offset" 1 } } */ -/* { dg-final { scan-assembler-times "\[\t \]0x13000040\[\t \]+\[^\n\]*btm_offset" 1 } } */ +/* { dg-final { scan-assembler-times "\[\t \]0x13000040\[\t \]+\[^\n\]*btm_offset" 1 { target { ! default_packed } } } } */ +/* { dg-final { scan-assembler-times "\[\t \]0x13000031\[\t \]+\[^\n\]*btm_offset" 1 { target { default_packed } } } } */ struct bitt { int a; |