This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: c++/5246: g++ 3.0.3: exception throw crash when -O -fomit-frame-pointer
- From: Gwenole Beauchesne <gbeauchesne at mandrakesoft dot com>
- To: gcc-gnats at gcc dot gnu dot org, gcc-prs at gcc dot gnu dot org, eru at netti dot fi, gcc-bugs at gcc dot gnu dot org, nobody at gcc dot gnu dot org
- Cc: gdr at codesourcery dot com
- Date: Tue, 12 Feb 2002 16:24:36 +0100
- Subject: Re: c++/5246: g++ 3.0.3: exception throw crash when -O -fomit-frame-pointer
Hi Gaby,
The following should fit the new-style dejagnu framework. Note: though
this happens to be fixed for 3.1, the problem remains for gcc-3.0.X,
even with X=4 as of 06-Feb-2002.
2002-02-12 Gwenole Beauchesne <gbeauchesne@mandrakesoft.com>
PR c++/5246, PR c++/2447
* g++.dg/eh/unwind1.C: New test.
--- gcc/testsuite/g++.dg/eh/unwind1.C.eh-failure Tue Feb 12 11:57:44 2002
+++ gcc/testsuite/g++.dg/eh/unwind1.C Tue Feb 12 11:57:44 2002
@@ -0,0 +1,34 @@
+// Reduced from PR c++/5246, PR c++/2447
+// { dg-do run }
+// { dg-options "-O -fomit-frame-pointer" }
+
+void step (int)
+{
+ void *sp = __builtin_alloca (0);
+}
+
+void f2 (void)
+{
+ step (2);
+ throw int();
+}
+
+void f1 (void)
+{
+ try
+ {
+ step (1);
+ f2 ();
+ step (-1);
+ }
+ catch (int)
+ {
+ step (3);
+ }
+}
+
+int main ()
+{
+ f1 ();
+ return 0;
+}
Bye,
Gwenole.
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=5246