public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/65644] New: Assembler errors on Solaris 10 x86-64: `(%eXX)' is not a valid 64 bit base/index expression
@ 2015-04-01  3:09 skunk at iskunk dot org
  2015-04-01  7:35 ` [Bug target/65644] " ubizjak at gmail dot com
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: skunk at iskunk dot org @ 2015-04-01  3:09 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65644

            Bug ID: 65644
           Summary: Assembler errors on Solaris 10 x86-64: `(%eXX)' is not
                    a valid 64 bit base/index expression
           Product: gcc
           Version: 4.9.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: skunk at iskunk dot org
              Host: x86_64-pc-solaris2.10
            Target: x86_64-pc-solaris2.10
             Build: x86_64-pc-solaris2.10

Created attachment 35197
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=35197&action=edit
test case

I built GCC 4.9.2 on a Solaris 10 system on x86-64, and then compiled a C
codebase that does some 64-bit-unsafe things (notably, assuming that pointers
are 32 bits, by casting unsigned ints to pointers). This resulted in "cast to
pointer from integer of different size" warnings as well as errors of the form

    {standard input}: Assembler messages:
    {standard input}:233: Error: `(%esi)' is not a valid 64 bit base/index
expression
    {standard input}:250: Error: `(%edx)' is not a valid 64 bit base/index
expression
    {standard input}:1150: Error: `(%edx)' is not a valid 64 bit base/index
expression

I have prepared a small test case that exhibits this same failure mode:

    $ gcc -m64 -O -c gcc-asm-bug.c
    gcc-asm-bug.c: In function 'foo1':
    gcc-asm-bug.c:14:4: warning: cast to pointer from integer of different size
[-Wint-to-pointer-cast]
       ((struct foo_struct *)xptr)->one = val;
        ^
    gcc-asm-bug.c: In function 'foo2':
    gcc-asm-bug.c:19:4: warning: cast to pointer from integer of different size
[-Wint-to-pointer-cast]
       ((struct foo_struct *)xptr)->two = val;
        ^
    /var/tmp//ccI3ovqk.s: Assembler messages:
    /var/tmp//ccI3ovqk.s:6: Error: `(%edi)' is not a valid 64 bit base/index
expression

No such error occurs when I compile this source on a Linux system, so this may
have to do with the Solaris assembler.


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

end of thread, other threads:[~2015-04-09 21:56 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-01  3:09 [Bug target/65644] New: Assembler errors on Solaris 10 x86-64: `(%eXX)' is not a valid 64 bit base/index expression skunk at iskunk dot org
2015-04-01  7:35 ` [Bug target/65644] " ubizjak at gmail dot com
2015-04-01  7:43 ` jakub at gcc dot gnu.org
2015-04-01  8:01 ` ubizjak at gmail dot com
2015-04-01 13:39 ` ro at CeBiTec dot Uni-Bielefeld.DE
2015-04-01 14:14 ` ubizjak at gmail dot com
2015-04-02 20:31 ` skunk at iskunk dot org
2015-04-06 20:29 ` skunk at iskunk dot org
2015-04-07 14:33 ` ro at CeBiTec dot Uni-Bielefeld.DE
2015-04-08  5:38 ` skunk at iskunk dot org
2015-04-08  9:43 ` ro at CeBiTec dot Uni-Bielefeld.DE
2015-04-09 21:56 ` skunk at iskunk 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).