public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug inline-asm/33932]  New: miscalculation of asm labels with -g3
@ 2007-10-28 18:52 stsp at users dot sourceforge dot net
  2007-10-28 18:56 ` [Bug inline-asm/33932] " stsp at users dot sourceforge dot net
                   ` (22 more replies)
  0 siblings, 23 replies; 24+ messages in thread
From: stsp at users dot sourceforge dot net @ 2007-10-28 18:52 UTC (permalink / raw)
  To: gcc-bugs

The following test program will
print "OK" if compiled without -g3
(-g1, -g2 are fine), and Segfaults
with -g3.

---
#include <stdio.h>

asm (
"__tst:\n"
"movl $1, %eax\n"
"ret\n");
int tst(void) asm ("__tst");

int main()
{
    if (tst() == 1)
        printf("OK\n");
    else
        printf("Segmentation fault\n");
    return 0;
}
---

With -g3, tst() will call to the wrong
address.

gcc version 4.1.2 20070925 (Red Hat 4.1.2-27)


-- 
           Summary: miscalculation of asm labels with -g3
           Product: gcc
           Version: 4.1.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: inline-asm
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: stsp at users dot sourceforge dot net
  GCC host triplet: x86_64, i386
GCC target triplet: x86_64, i386


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33932


^ permalink raw reply	[flat|nested] 24+ messages in thread

end of thread, other threads:[~2009-06-10 16:33 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-10-28 18:52 [Bug inline-asm/33932] New: miscalculation of asm labels with -g3 stsp at users dot sourceforge dot net
2007-10-28 18:56 ` [Bug inline-asm/33932] " stsp at users dot sourceforge dot net
2007-10-28 18:59 ` pinskia at gcc dot gnu dot org
2007-10-28 19:25 ` stsp at users dot sourceforge dot net
2007-10-29 17:50 ` stsp at users dot sourceforge dot net
2008-01-11 21:17 ` stsp at users dot sourceforge dot net
2008-01-11 21:43 ` mmitchel at gcc dot gnu dot org
2008-01-11 23:41 ` stsp at users dot sourceforge dot net
2008-12-28  2:37 ` pinskia at gcc dot gnu dot org
2008-12-28  9:41 ` stsp at users dot sourceforge dot net
2008-12-28 12:21 ` steven at gcc dot gnu dot org
2008-12-28 12:35 ` stsp at users dot sourceforge dot net
2008-12-28 12:53 ` steven at gcc dot gnu dot org
2008-12-28 13:04 ` stsp at users dot sourceforge dot net
2008-12-28 13:05 ` stsp at users dot sourceforge dot net
2008-12-28 13:16 ` steven at gcc dot gnu dot org
2008-12-28 13:24 ` steven at gcc dot gnu dot org
2008-12-28 13:55 ` stsp at users dot sourceforge dot net
2008-12-28 14:04 ` pinskia at gcc dot gnu dot org
2008-12-28 18:43 ` mmitchel at gcc dot gnu dot org
2008-12-29 12:31 ` bonzini at gnu dot org
2008-12-29 23:07 ` stsp at users dot sourceforge dot net
2008-12-29 23:50 ` mark at codesourcery dot com
2009-06-10 16:33 ` 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).