From: Uros Bizjak Date: Fri, 18 Sep 2015 16:27:51 +0000 (+0200) Subject: re PR middle-end/67619 (ICE at -O1 and above on x86_64-linux-gnu in int_mode_for_mode... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=dcd7a7dfce175c00f4a0f58d7950c6c26e24dea5;p=gcc.git re PR middle-end/67619 (ICE at -O1 and above on x86_64-linux-gnu in int_mode_for_mode, at stor-layout.c:425) PR middle-end/67619 * except.c (expand_builtin_eh_return): Use copy_addr_to_reg to copy the address to a register. testsuite/ChangeLog: PR middle-end/67619 * gcc.dg/torture/pr67619.c: New test. From-SVN: r227909 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 469abad356f..4f712e3fe7f 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,4 +1,10 @@ -2015-09-16 Jeff Law +2015-09-18 Uros Bizjak + + PR middle-end/67619 + * except.c (expand_builtin_eh_return): Use copy_addr_to_reg to copy + the address to a register. + +2015-09-18 Jeff Law PR tree-optimization/47679 * Makefile.in (OBJS): Add tree-ssa-phionlycprop.o diff --git a/gcc/except.c b/gcc/except.c index 86ad6bc4446..f77a2fa6fb3 100644 --- a/gcc/except.c +++ b/gcc/except.c @@ -2219,7 +2219,7 @@ expand_builtin_eh_return (tree stackadj_tree ATTRIBUTE_UNUSED, VOIDmode, EXPAND_NORMAL); tmp = convert_memory_address (Pmode, tmp); if (!crtl->eh.ehr_stackadj) - crtl->eh.ehr_stackadj = copy_to_reg (tmp); + crtl->eh.ehr_stackadj = copy_addr_to_reg (tmp); else if (tmp != crtl->eh.ehr_stackadj) emit_move_insn (crtl->eh.ehr_stackadj, tmp); #endif @@ -2228,7 +2228,7 @@ expand_builtin_eh_return (tree stackadj_tree ATTRIBUTE_UNUSED, VOIDmode, EXPAND_NORMAL); tmp = convert_memory_address (Pmode, tmp); if (!crtl->eh.ehr_handler) - crtl->eh.ehr_handler = copy_to_reg (tmp); + crtl->eh.ehr_handler = copy_addr_to_reg (tmp); else if (tmp != crtl->eh.ehr_handler) emit_move_insn (crtl->eh.ehr_handler, tmp); diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 08baed1ef3f..f959a789f55 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2015-09-18 Uros Bizjak + + PR middle-end/67619 + * gcc.dg/torture/pr67619.c: New test. + 2015-09-18 Alan Lawrence PR tree-optimization/67283 diff --git a/gcc/testsuite/gcc.dg/torture/pr67619.c b/gcc/testsuite/gcc.dg/torture/pr67619.c new file mode 100644 index 00000000000..e441ee97dac --- /dev/null +++ b/gcc/testsuite/gcc.dg/torture/pr67619.c @@ -0,0 +1,12 @@ +/* { dg-do compile } */ + +void +foo () +{ + unsigned long l; + void *p = 0; + + __builtin_unwind_init (); + l = 0; + __builtin_eh_return (l, p); +}