[Bug target/38085] gcc -m64 -pg generates invalid assembler code on Solaris 10/x86

mcintosh_shane at emc dot com gcc-bugzilla@gcc.gnu.org
Thu May 28 21:02:00 GMT 2009



------- Comment #1 from mcintosh_shane at emc dot com  2009-05-28 21:01 -------
I can confirm this bug exists when generating position independent code:

-bash-3.00$ uname -a
SunOS bu-navel 5.10 Generic_118855-33 i86pc i386

-bash-3.00$ /usr/sfw/bin/gcc --version
gcc (GCC) 3.4.3 (csl-sol210-3_4-branch+sol_rpath)
Copyright (C) 2004 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

-bash-3.00$ cat test.c
int
main(void)
{
}

-bash-3.00$ gcc -fPIC -m64 -pg -o test test.c
/var/tmp//ccAhFbgE.s: Assembler messages:
/var/tmp//ccAhFbgE.s:16: Error: junk `@' after expression

-bash-3.00$ /usr/sfw/bin/gcc -S -fPIC -m64 -pg -o test.s test.c

-bash-3.00$ cat test.s
        .file   "test.c"
        .text
.globl main
        .type   main, @function
main:
.LFB2:
        pushq   %rbp
.LCFI0:
        movq    %rsp, %rbp
.LCFI1:
        .data
        .align 8
.LP2:
        .quad   0
        .text
        leaq    .LP2@(%rip),%r11
        call    *_mcount@GOTPCREL(%rip)
        leave
        ret
.LFE2:
        .size   main, .-main
        .section        .eh_frame,"a",@unwind
.Lframe1:
        .long   .LECIE1-.LSCIE1
.LSCIE1:
        .long   0x0
        .byte   0x1
        .string "zR"
        .uleb128 0x1
        .sleb128 -8
        .byte   0x10
        .uleb128 0x1
        .byte   0x1b
        .byte   0xc
        .uleb128 0x7
        .uleb128 0x8
        .byte   0x90
        .uleb128 0x1
        .align 8
.LECIE1:
.LSFDE1:
        .long   .LEFDE1-.LASFDE1
.LASFDE1:
        .long   .LASFDE1-.Lframe1
        .long   .LFB2-.
        .long   .LFE2-.LFB2
        .uleb128 0x0
        .byte   0x4
        .long   .LCFI0-.LFB2
        .byte   0xe
        .uleb128 0x10
        .byte   0x86
        .uleb128 0x2
        .byte   0x4
        .long   .LCFI1-.LCFI0
        .byte   0xd
        .uleb128 0x6
        .align 8
.LEFDE1:
        .ident  "GCC: (GNU) 3.4.3 (csl-sol210-3_4-branch+sol_rpath)"


-- 


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



More information about the Gcc-bugs mailing list