public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
[parent not found: <bug-19969-4@http.gcc.gnu.org/bugzilla/>]
* [Bug c/19969] New: Labels broken when passed into inline assembly.
@ 2005-02-15 16:18 estith at cs dot und dot edu
2005-02-15 16:18 ` [Bug c/19969] " pinskia at gcc dot gnu dot org
0 siblings, 1 reply; 3+ messages in thread
From: estith at cs dot und dot edu @ 2005-02-15 16:18 UTC (permalink / raw)
To: gcc-bugs
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1212 bytes --]
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Bug c/19969] Labels broken when passed into inline assembly.
2005-02-15 16:18 [Bug c/19969] New: " estith at cs dot und dot edu
@ 2005-02-15 16:18 ` pinskia at gcc dot gnu dot org
0 siblings, 0 replies; 3+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-02-15 16:18 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-02-15 03:14 -------
This is not a bug, Labels can be moved if you don't use them as computed gotos in which this case you
don't use it for that. Also note asms cannot, I repeat cannot change the flow of a program at all.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |INVALID
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19969
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-03-16 18:08 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <bug-19969-10101@http.gcc.gnu.org/bugzilla/>
2008-01-01 9:23 ` [Bug c/19969] Labels broken when passed into inline assembly schwab at suse dot de
[not found] <bug-19969-4@http.gcc.gnu.org/bugzilla/>
2024-03-16 18:08 ` pinskia at gcc dot gnu.org
2005-02-15 16:18 [Bug c/19969] New: " estith at cs dot und dot edu
2005-02-15 16:18 ` [Bug c/19969] " pinskia at gcc dot gnu dot org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).