aboutsummaryrefslogtreecommitdiff
path: root/gcc/cgraphunit.c
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2018-10-10 22:54:04 +0000
committerEric Botcazou <ebotcazou@gcc.gnu.org>2018-10-10 22:54:04 +0000
commita1a0e08d63b3b1d68e2e270f4c62b8d4c4ae2640 (patch)
tree43750fb46850413cd9c01b9ce3f9623a2d05531f /gcc/cgraphunit.c
parent8e9558f029123e00008d3ef464922128d018f0fc (diff)
downloadgcc-a1a0e08d63b3b1d68e2e270f4c62b8d4c4ae2640.zip
gcc-a1a0e08d63b3b1d68e2e270f4c62b8d4c4ae2640.tar.gz
gcc-a1a0e08d63b3b1d68e2e270f4c62b8d4c4ae2640.tar.bz2
re PR middle-end/87574 (ICE in add_data_member_location_attribute at gcc/gcc/dwarf2out.c:19226 since r264943)
PR middle-end/87574 * cgraphunit.c (cgraph_node::expand_thunk): Force DECL_IGNORED_P on the thunk when expanding to GIMPLE. From-SVN: r265028
Diffstat (limited to 'gcc/cgraphunit.c')
-rw-r--r--gcc/cgraphunit.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/cgraphunit.c b/gcc/cgraphunit.c
index 5176cd1..cb84954 100644
--- a/gcc/cgraphunit.c
+++ b/gcc/cgraphunit.c
@@ -1862,6 +1862,12 @@ cgraph_node::expand_thunk (bool output_asm_thunks, bool force_gimple_thunk)
DECL_ARGUMENTS. In this case force_gimple_thunk is true. */
if (in_lto_p && !force_gimple_thunk)
get_untransformed_body ();
+
+ /* We need to force DECL_IGNORED_P when the thunk is created
+ after early debug was run. */
+ if (force_gimple_thunk)
+ DECL_IGNORED_P (thunk_fndecl) = 1;
+
a = DECL_ARGUMENTS (thunk_fndecl);
current_function_decl = thunk_fndecl;