]> git.ipfire.org Git - thirdparty/gcc.git/commit
btf: improve btf-datasec-3.c test [PR114642]
authorDavid Faust <david.faust@oracle.com>
Mon, 8 Apr 2024 20:33:48 +0000 (13:33 -0700)
committerDavid Faust <david.faust@oracle.com>
Tue, 9 Apr 2024 18:11:42 +0000 (11:11 -0700)
commit639215c5eb6c56ba3830cd868d1d3ddd700b4c90
treeaccacb22ac6f6695f4c11f77f9e4cf72a45738c6
parent1f719aa7c0d35b47f3d15a54f074718b78e92bb0
btf: improve btf-datasec-3.c test [PR114642]

This test failed on powerpc --target_board=unix'{-m32}' because two
variables were not placed in sections where the test silently (and
incorrectly) assumed they would be.

The important thing for the test is only that BTF_KIND_DATASEC entries
are NOT generated for the extern variable declarations without an
explicit section attribute.  Make the test more robust by placing the
non-extern variables in explicit sections, and invert the checks to
more accurately verify what we care about in this test.

gcc/testsuite/
PR testsuite/114642
* gcc.dg/debug/btf/btf-datasec-3.c: Make test more robust on different
architectures.
gcc/testsuite/gcc.dg/debug/btf/btf-datasec-3.c