This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug middle-end/28581] Illegal loading the address of a label with -O2
- From: "ebotcazou at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 18 Nov 2007 08:46:43 -0000
- Subject: [Bug middle-end/28581] Illegal loading the address of a label with -O2
- References: <bug-28581-5993@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #10 from ebotcazou at gcc dot gnu dot org 2007-11-18 08:46 -------
> The compiler is refusing to see the usage of labels as addresses in other
> places than "goto"s. I think you call this "design". But one cant expect
> the code to produce different results with "optimization" enabled. This is
> against the definition of "optimization".
This is acceptable if the code is deemed invalid.
> It would be nice if you could include a fix for this. It even helps writing
> "self-modifying" code, you see. (apart from "goto"s). In fact that is when I
> hit this problem.
I agree that we should clarify the documentation if we definitely rule the
code as being invalid.
--
ebotcazou at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |ebotcazou at gcc dot gnu dot
| |org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28581