This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/19969] New: Labels broken when passed into inline assembly.
- From: "estith at cs dot und dot edu" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 15 Feb 2005 03:11:02 -0000
- Subject: [Bug c/19969] New: Labels broken when passed into inline assembly.
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
The following code breaks when compiled with -O3 or -O2, because the label
seems to be misplaced. This problem seems to be restricted to situations where
I pass the address of a label into an assembly routine to be used. When
compiled without optimizations or with -O1, it works properly. I´m compiling
in FreeBSD 5.3-RELEASE gcc version 3.4.3, and I have confirmed that it occurs
also on Knoppix 3.6 with compiler version 3.3.4. No flags other than
aforementioned optimization flags were used in any case. I hope this is enough
info.
main()
{
puts("This line should print.\n");
asm("jmpl *%0\n":: "q" (&&foo));
puts("This line should not print");
foo:
puts("And this line should print.\n");
}
--
Summary: Labels broken when passed into inline assembly.
Product: gcc
Version: 3.4.3
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: estith at cs dot und dot edu
CC: gcc-bugs at gcc dot gnu dot org
GCC host triplet: 3.4.3
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19969