aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorUros Bizjak <uros@gcc.gnu.org>2015-09-18 18:27:51 +0200
committerUros Bizjak <uros@gcc.gnu.org>2015-09-18 18:27:51 +0200
commitdcd7a7dfce175c00f4a0f58d7950c6c26e24dea5 (patch)
tree945aa2d1b185af278cda26cf9296ebab74fdfa45 /gcc
parenta502f7b6e47d3f790e01e91ab5c480ee4b261486 (diff)
downloadgcc-dcd7a7dfce175c00f4a0f58d7950c6c26e24dea5.zip
gcc-dcd7a7dfce175c00f4a0f58d7950c6c26e24dea5.tar.gz
gcc-dcd7a7dfce175c00f4a0f58d7950c6c26e24dea5.tar.bz2
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
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog8
-rw-r--r--gcc/except.c4
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr67619.c12
4 files changed, 26 insertions, 3 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 469abad..4f712e3 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,4 +1,10 @@
-2015-09-16 Jeff Law <law@redhat.com>
+2015-09-18 Uros Bizjak <ubizjak@gmail.com>
+
+ 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 <law@redhat.com>
PR tree-optimization/47679
* Makefile.in (OBJS): Add tree-ssa-phionlycprop.o
diff --git a/gcc/except.c b/gcc/except.c
index 86ad6bc..f77a2fa 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 08baed1..f959a789 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2015-09-18 Uros Bizjak <ubizjak@gmail.com>
+
+ PR middle-end/67619
+ * gcc.dg/torture/pr67619.c: New test.
+
2015-09-18 Alan Lawrence <alan.lawrence@arm.com>
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 0000000..e441ee9
--- /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);
+}