This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug rtl-optimization/47918] [4.6/4.7 Regression] noreturn discovery broke non local gotos on m68k and i386


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

Mikael Pettersson <mikpe at it dot uu.se> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Target|m68k-linux                  |m68k-linux,
                   |                            |i686-pc-linux-gnu
      Known to work|                            |4.5.3
            Summary|[4.6/4.7 Regression]        |[4.6/4.7 Regression]
                   |noreturn discovery broke    |noreturn discovery broke
                   |non local gotos on m68k     |non local gotos on m68k and
                   |                            |i386
      Known to fail|                            |4.6.1

--- Comment #7 from Mikael Pettersson <mikpe at it dot uu.se> 2011-07-08 10:56:32 UTC ---
I don't even have to tweak the i386 backend to trigger the error on i386, just
make the nested function y() regparm(0)

--- non-local-goto-4.c.~1~      2011-07-07 20:04:29.000000000 +0200
+++ non-local-goto-4.c  2011-07-08 12:49:36.000000000 +0200
@@ -15,7 +15,7 @@ int
 x(a)
 {
   __label__ xlab;
-  void y(a)
+  void __attribute__((regparm(0))) y(a)
     {
       if (a==0)
        goto xlab;

and compile with options to force the use of PUSH for parameter passing:

> gcc -O3 -fomit-frame-pointer -fno-asynchronous-unwind-tables -mpush-args -mno-accumulate-outgoing-args non-local-goto-4.c
> ./a.out
Abort


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]