[Bug middle-end/38587] [4.4 Regression] psim miscompiled #2
hjl dot tools at gmail dot com
gcc-bugzilla@gcc.gnu.org
Wed Jan 21 03:28:00 GMT 2009
------- Comment #35 from hjl dot tools at gmail dot com 2009-01-21 03:27 -------
(In reply to comment #34)
> C standard guarantees that automatic variable only with volatile will be
> restored after longjmp. Gcc puts volatiles on stack and don't use pseudos for
> them. So they will be never shared on stack.
>
> I think the code (its expected behavior) does not conform with the standard.
>
> Unfortunately there are a lot of code which does not conform with the standard.
> So I think we should provide the same functionality. It can be done by
> prohibiting stack slot sharing in IRA if there are setjmps in the function.
>
Does C standard say anything about function argument? "system", which
is a function argument, is trashed here.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38587
More information about the Gcc-bugs
mailing list