This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c/11420] New: [x86_64] gcc generates invalid asm code when "-O -fPIC" is used (suffix or operands invalid for `movabs')


PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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

           Summary: [x86_64] gcc generates invalid asm code when "-O -fPIC"
                    is used (suffix or operands invalid for `movabs')
           Product: gcc
           Version: 3.3
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: gcc-bugs at nogin dot org
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: x86_64-redhat-linux
  GCC host triplet: x86_64-redhat-linux
GCC target triplet: x86_64-redhat-linux

Reproducible: 100%

To reproduce, run "gcc -O -fPIC -c bug.c" (I will attach a small self-contained
bug.c shortly).

Expected: it compiles (or produces an error message if the source is not a valid
C program).

Actual:

/tmp/ccMEmtFi.s: Assembler messages:
/tmp/ccMEmtFi.s:14: Error: suffix or operands invalid for `movabs'
Exit 1

This bug comes up when trying to compile OCaml (current CVS head) on x86_64
under a recent Red Hat Rawhide tree.

Note that both -O and -fPIC options are necessary to reproduce (without one or
both of them, the file compiles fine).

% gcc -v
Reading specs from /usr/lib/gcc-lib/x86_64-redhat-linux/3.3/specs
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man
--infodir=/usr/share/info --enable-shared --enable-threads=posix
--disable-checking --with-system-zlib --enable-__cxa_atexit
--host=x86_64-redhat-linux
Thread model: posix
gcc version 3.3 20030623 (Red Hat Linux 3.3-12)

I also reported this to Red Hat - see
http://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=98518


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]