Skip to content
Snippets Groups Projects
Commit 978b62e5 authored by Jakub Jelinek's avatar Jakub Jelinek
Browse files

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.
parent 65061ea2
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment