From 60ebe8ce1d029cbff8ef80c967f98ba43d746f3b Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Fri, 2 Dec 2016 09:44:42 +0100 Subject: re PR rtl-optimization/78547 (ICE: in loc_cmp, at var-tracking.c:3417 with -Os -g -mstringop-strategy=libcall -freorder-blocks-algorithm=simple) PR rtl-optimization/78547 * emit-rtl.c (unshare_all_rtl): Make sure DECL_RTL and DECL_INCOMING_RTL is not shared. * config/i386/i386.c (convert_scalars_to_vectors): If any insns have been converted, adjust all parameter's DEC_RTL and DECL_INCOMING_RTL back from V1TImode to TImode if the parameters have TImode. * gcc.dg/pr78547.c: New test. From-SVN: r243165 --- gcc/emit-rtl.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'gcc/emit-rtl.c') diff --git a/gcc/emit-rtl.c b/gcc/emit-rtl.c index 02512d3..d2ac88b 100644 --- a/gcc/emit-rtl.c +++ b/gcc/emit-rtl.c @@ -2668,6 +2668,14 @@ unsigned int unshare_all_rtl (void) { unshare_all_rtl_1 (get_insns ()); + + for (tree decl = DECL_ARGUMENTS (cfun->decl); decl; decl = DECL_CHAIN (decl)) + { + if (DECL_RTL_SET_P (decl)) + SET_DECL_RTL (decl, copy_rtx_if_shared (DECL_RTL (decl))); + DECL_INCOMING_RTL (decl) = copy_rtx_if_shared (DECL_INCOMING_RTL (decl)); + } + return 0; } -- cgit v1.1