]> gcc.gnu.org Git - gcc.git/commit
function: Set dummy DECL_ASSEMBLER_NAME in push_dummy_function [PR100580]
authorJakub Jelinek <jakub@redhat.com>
Tue, 18 May 2021 08:10:17 +0000 (10:10 +0200)
committerJakub Jelinek <jakub@redhat.com>
Mon, 31 May 2021 11:51:54 +0000 (13:51 +0200)
commitc4d64d136e4e35fb2ee90771848944bb2ffeaf85
tree82fc5c01342f683216d1d6e61df5623ceb243cea
parent81c2cd08fafcdc0ff48f6cf440bef86f98822a23
function: Set dummy DECL_ASSEMBLER_NAME in push_dummy_function [PR100580]

Last year I've added cgraph_node::get_create calls for the dummy
functions used for -fdump-passes, so that it interacts well with pass
disabling/enabling which is cgraph uid based.
Unfortunately, as the following testcase shows, when assembler hash
is present, that wants to compute DECL_ASSEMBLER_NAME and the C++ FE
is unprepared to handle it on the dummy functions which don't have
DECL_NAME etc.
The following patch fixes it by setting up a dummy DECL_ASSEMBLER_NAME
on these, so that the FEs don't need to compute it.

2021-05-18  Jakub Jelinek  <jakub@redhat.com>

PR c++/100580
* function.c (push_dummy_function): Set DECL_ARTIFICIAL and
DECL_ASSEMBLER_NAME on the fn_decl.

* g++.dg/other/pr100580.C: New test.

(cherry picked from commit 978b62e554ffb4b34844c72d259ce71fcbd87591)
gcc/function.c
gcc/testsuite/g++.dg/other/pr100580.C [new file with mode: 0644]
This page took 0.065132 seconds and 6 git commands to generate.