[LLVMbugs] [Bug 6414] Nondeterministic invalid optimization in llvm-ld

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Wed Feb 24 11:57:17 PST 2010


http://llvm.org/bugs/show_bug.cgi?id=6414

Bill Wendling <wendling at apple.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |wendling at apple.com
         Resolution|                            |INVALID

--- Comment #1 from Bill Wendling <wendling at apple.com> 2010-02-24 13:57:17 CST ---
The example doesn't build. Nevertheless, it appears to be invalid. From
http://gcc.gnu.org/onlinedocs/gcc/Nested-Functions.html :

"If you try to call the nested function through its address after the
containing function has exited, all hell will break loose. If you try to call
it after a containing scope level has exited, and if it refers to some of the
variables that are no longer in scope, you may be lucky, but it's not wise to
take the risk. If, however, the nested function does not refer to anything that
has gone out of scope, you should be safe."

The "should be safe" doesn't guarantee that it will act in the way you expect.

-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the llvm-bugs mailing list