[gdb/testsuite] Fix gdb.base/endianity.exp with gcc-4.8
authorTom de Vries <tdevries@suse.de>
Sun, 13 Dec 2020 16:22:40 +0000 (17:22 +0100)
committerTom de Vries <tdevries@suse.de>
Sun, 13 Dec 2020 16:22:40 +0000 (17:22 +0100)
commit862fcbd8f02b03cbf37b452e35bff8361d7a0208
tree65a5f791fb015da9692b367267463b8dfd94a2af
parenta406a98e6e061ac865747ac2d2ba73a2ecaab081
[gdb/testsuite] Fix gdb.base/endianity.exp with gcc-4.8

When running test-case gdb.base/endianity.exp using gcc-4.8, we get:
...
(gdb) x/x &o.v^M
0x7fffffffd120: 0x00000004^M
(gdb) XFAIL: gdb.base/endianity.exp: x/x &o.v
x/xh &o.w^M
0x7fffffffd124: 0x0003^M
(gdb) FAIL: gdb.base/endianity.exp: x/xh &o.w
...

The gcc 4.8 compiler does not support the scalar_storage_order attribute, so
the testcase is compiled without that attribute, and the expected results are
different.

Fix this by rather than xfailing, skipping the tests if the compiler does not
support the scalar_storage_order attribute.

Tested on x86_64-linux, with gcc-4.8, gcc-7, and clang-10.

gdb/testsuite/ChangeLog:

2020-12-13  Tom de Vries  <tdevries@suse.de>

PR testsuite/26953
* gdb.base/endianity.exp: Skip tests requiring scalar_storage_order
attribute support if compiler doesn't support it.
gdb/testsuite/ChangeLog
gdb/testsuite/gdb.base/endianity.exp
This page took 0.025747 seconds and 4 git commands to generate.