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 middle-end/38587] [4.4 Regression] psim miscompiled #2



------- Comment #21 from hjl dot tools at gmail dot com  2009-01-20 05:00 -------
(In reply to comment #20)
> The problem may something to do with
> 
> setjmp
> ...
> while (1)
> {
>   foo (); // foo calls longjmp and foo is inlined.
> }
> 

The problem is

  if (setjmp (buf))
    {
      /* Restore registers from stack.  */
    }

  while (1)
    {
      bar ();   /* Reuse stack slots used to restore registers after
                   longjmp.  */
      foo ();   /* Call longjmp.  */
    }

IRA should avoid reusing stack slots used to restore registers after
longjmp.


-- 


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


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