]> gcc.gnu.org Git - gcc.git/commit
cgraphunit: Don't emit asm thunks for -dx [PR106261]
authorJakub Jelinek <jakub@redhat.com>
Wed, 27 Jul 2022 10:06:22 +0000 (12:06 +0200)
committerJakub Jelinek <jakub@redhat.com>
Wed, 3 May 2023 11:20:27 +0000 (13:20 +0200)
commit408fe10442aa53e2b4573abbf0536aa677c92512
tree956eea239cbaa889c0332e66fdbc2cb76efa6823
parent6e7bf9bc3e51d2d0d0df3d810cb20624594573cf
cgraphunit: Don't emit asm thunks for -dx [PR106261]

When -dx option is used (didn't know we have it and no idea what is it
useful for), we just expand functions to RTL and then omit all further
RTL passes, so the normal functions aren't actually emitted into assembly,
just variables.
The following testcase ICEs, because we don't emit the methods, but do
emit thunks pointing to that and those thunks have unwind info and rely on
at least some real functions to be emitted (which is normally the case,
thunks are only emitted for locally defined functions) because otherwise
there are no CIEs, only FDEs and dwarf2out is upset about it.

The following patch fixes that by not emitting assembly thunks for -dx
either.

2022-07-27  Jakub Jelinek  <jakub@redhat.com>

PR debug/106261
* cgraphunit.c (cgraph_node::assemble_thunks_and_aliases): Don't
output asm thunks for -dx.

* g++.dg/debug/pr106261.C: New test.

(cherry picked from commit f9671b60f9395cb1dca128b92f5dd215f5aeaae1)
gcc/cgraphunit.c
gcc/testsuite/g++.dg/debug/pr106261.C [new file with mode: 0644]
This page took 0.062277 seconds and 6 git commands to generate.