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: "steven 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 16:05: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 #12 from steven at gcc dot gnu dot org 2007-11-18 16:05 -------
This is not a smal thing to fix at all.
"Fixing" this involves teaching the compiler that some labels cannot be moved;
that these labels are optimization barriers (i.e. no insn can be safely moved
up or down across the label); that basic blocks beginning with an addressable
label cannot be merged with other basic blocks, duplicated for e.g. unrolling
or versioning, or removed if they have become unreachable; and probably many
more things.
This is not "spoiling" the idea of the extension. You're just using it in a
way that the extension is not intended for.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28581