Add DWARF5 variants of assembly scan tests that use DW_FORM_implicit_const
authorMark Wielaard <mark@klomp.org>
Sun, 23 Aug 2020 14:21:08 +0000 (16:21 +0200)
committerMark Wielaard <mark@klomp.org>
Thu, 17 Sep 2020 18:13:13 +0000 (20:13 +0200)
commit71e3d1970c00a74be16c0f5a3fcaced359077135
tree0b8e2531078c897dad1349c83761f85f81b9231c
parentee7aa7e7b9d490c9c929edfd4d4a730df2f0052d
Add DWARF5 variants of assembly scan tests that use DW_FORM_implicit_const

Some DWARF tests scan the assembly output looking for constant values.
When using DWARF5 those constants might use DW_FORM_implicit_const,
which are output (in the comments) after the attribute instead of
before. To make sure these tests work introduce a -gdwarf-5 variant
of these tests and explicitly use -gdwarf-2 for the original.

gcc/testsuite/ChangeLog:

* gcc.dg/debug/dwarf2/inline2.c: Add -gdwarf-2.
* g++.dg/debug/dwarf2/inline-var-1.C: Likewise.
* gcc.dg/debug/dwarf2/pr41445-5.c: Likewise.
* gcc.dg/debug/dwarf2/pr41445-6.c: Likewise.
* gcc.dg/debug/dwarf2/inline6.c: New variant with -gdwarf-5.
* g++.dg/debug/dwarf2/inline-var-3.C: Likewise.
* gcc.dg/debug/dwarf2/pr41445-7.c: Likewise.
* gcc.dg/debug/dwarf2/pr41445-8.c: Likewise.
gcc/testsuite/g++.dg/debug/dwarf2/inline-var-1.C
gcc/testsuite/g++.dg/debug/dwarf2/inline-var-3.C [new file with mode: 0644]
gcc/testsuite/gcc.dg/debug/dwarf2/inline2.c
gcc/testsuite/gcc.dg/debug/dwarf2/inline6.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/debug/dwarf2/pr41445-5.c
gcc/testsuite/gcc.dg/debug/dwarf2/pr41445-6.c
gcc/testsuite/gcc.dg/debug/dwarf2/pr41445-7.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/debug/dwarf2/pr41445-8.c [new file with mode: 0644]