[Bug target/45206] [4.6 regression] ICE on __builtin_eh_return at -Os

2010-09-07 Thread ubizjak at gmail dot com


--- Comment #10 from ubizjak at gmail dot com  2010-09-07 09:25 ---
We just calculated SP in the code following the comment:
/* eh_return epilogues need %ecx added to the stack pointer.  */

So, stack pointer should be valid at the end.

I'm testing following patch:

Index: i386.c
===
--- i386.c  (revision 163940)
+++ i386.c  (working copy)
@@ -10118,6 +10118,7 @@ ix86_expand_epilogue (int style)
}
}
  m-fs.sp_offset = UNITS_PER_WORD;
+ m-fs.sp_valid = true;
}
 }
   else


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45206



[Bug target/45206] [4.6 regression] ICE on __builtin_eh_return at -Os

2010-09-07 Thread ubizjak at gmail dot com


--- Comment #11 from ubizjak at gmail dot com  2010-09-07 14:38 ---
Patch at [1].

[1] http://gcc.gnu.org/ml/gcc-patches/2010-09/msg00563.html


-- 

ubizjak at gmail dot com changed:

   What|Removed |Added

 AssignedTo|unassigned at gcc dot gnu   |ubizjak at gmail dot com
   |dot org |
URL||http://gcc.gnu.org/ml/gcc-
   ||patches/2010-
   ||09/msg00563.html
 Status|NEW |ASSIGNED
   Last reconfirmed|2010-08-14 14:01:27 |2010-09-07 14:38:00
   date||


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45206



[Bug target/45206] [4.6 regression] ICE on __builtin_eh_return at -Os

2010-09-07 Thread uros at gcc dot gnu dot org


--- Comment #12 from uros at gcc dot gnu dot org  2010-09-07 15:39 ---
Subject: Bug 45206

Author: uros
Date: Tue Sep  7 15:38:59 2010
New Revision: 163955

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=163955
Log:
PR target/45206
* config/i386/i386.c (ix86_expand_epilogue): Mark SP valid after
eh_return fixup sequence.

testsuite/ChangeLog:

PR target/45206
* gcc.target/i386/pr45206.c: New test.

Added:
trunk/gcc/testsuite/gcc.target/i386/pr45206.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/i386/i386.c
trunk/gcc/testsuite/ChangeLog


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45206



[Bug target/45206] [4.6 regression] ICE on __builtin_eh_return at -Os

2010-09-07 Thread ubizjak at gmail dot com


--- Comment #13 from ubizjak at gmail dot com  2010-09-07 15:42 ---
Fixed.


-- 

ubizjak at gmail dot com changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45206



[Bug target/45206] [4.6 regression] ICE on __builtin_eh_return at -Os

2010-08-14 Thread ebotcazou at gcc dot gnu dot org


--- Comment #8 from ebotcazou at gcc dot gnu dot org  2010-08-14 14:01 
---
Recategorizing after:

2010-08-12  H.J. Lu  hongjiu...@intel.com
Uros Bizjak  ubiz...@gmail.com

* config.gcc: Handle --enable-frame-pointer.

* configure.ac: Add --enable-frame-pointer.
* configure: Regenerated.

* config/i386/i386.c (USE_IX86_FRAME_POINTER): Default to 0.
(override_options): If not configured with --enable-frame-pointer,
enable -fomit-frame-pointer (but not for TARGET_MACHO or when
optimizing for size), -fasynchronous-unwind-tables and
-maccumulate-outgoing-args by default.

The option -Os (or -mno-accumulate-outgoing-args) is now needed:

e...@new-host:~/gnat/gnat-head/native32 gcc/xgcc -Bgcc -S pr45206.c -Os
pr45206.c: In function '_Unwind_RaiseException':
pr45206.c:8:1: internal compiler error: in ix86_expand_epilogue, at
config/i386/i386.c:10177
Please submit a full bug report,
with preprocessed source if appropriate.
See http://gcc.gnu.org/bugs.html for instructions.


-- 

ebotcazou at gcc dot gnu dot org changed:

   What|Removed |Added

   Severity|blocker |major
  Component|bootstrap   |target
  GCC build triplet|i586-*-*|ix86-*-*
   GCC host triplet|i586-*-*|ix86-*-*
 GCC target triplet|i586-*-*|ix86-*-*
   Last reconfirmed|2010-08-06 11:06:16 |2010-08-14 14:01:27
   date||
Summary|[4.6 regression] ICE in |[4.6 regression] ICE on
   |ix86_expand_epilogue|__builtin_eh_return at -Os
   |compiling libgcc|


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45206



[Bug target/45206] [4.6 regression] ICE on __builtin_eh_return at -Os

2010-08-14 Thread hjl dot tools at gmail dot com


--- Comment #9 from hjl dot tools at gmail dot com  2010-08-14 22:23 ---
assert is too strong as shown in the testcase.
This patch works for me:

--
diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
index b925122..863c9bf 100644
--- a/gcc/config/i386/i386.c
+++ b/gcc/config/i386/i386.c
@@ -10030,7 +10030,11 @@ ix86_expand_epilogue (int style)
   rtx t;

   if (frame.nregs)
-  ix86_emit_restore_regs_using_mov (frame.reg_save_offset, style == 2);
+  {
+ix86_emit_restore_regs_using_mov (frame.reg_save_offset,
+  style == 2);
+m-fs.sp_valid = true;
+  }

   /* eh_return epilogues need %ecx added to the stack pointer.  */
   if (style == 2)
--


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45206