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]

c++/3605: g++ can't compile specific inline asm with -O



>Number:         3605
>Category:       c++
>Synopsis:       g++ can't compile specific inline asm with -O
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Jul 07 14:06:00 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator:     Vladimir Kondratiev
>Release:        3.0
>Organization:
>Environment:
[]gcc -v
Reading specs from /usr/lib/gcc-lib/i686-pc-linux-gnu/3.0/specs
Configured with: ../configure --prefix=/usr
Thread model: single
gcc version 3.0
[]uname -mrs
Linux 2.4.5-10 i686
>Description:
File attached fails to compile as c++ code with optimization. Errors produced:
convert.cc: In function `long int f(float)':
convert.cc:4: output number 0 not directly addressable
convert.cc:4: inconsistent operand constraints in an `asm'

This file do compiles, however, without optimization. It compiles as 'C' code with any optimization.
Original code is extracted from KDE libs.


>How-To-Repeat:
Not compile:
gcc -O -c convert.cc
(as well as -O1, -O2, -O3)

Do compile:
gcc -c convert.cc
gcc -x c -O3 convert.cc
(as C code it compiles with any optimization)
>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: application/octet-stream; name="convert.cc"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="convert.cc"

bG9uZyBmIChmbG9hdCBpbnZhbCkKewogIGxvbmcgcmV0OwogIGFzbSAoImZpc3RwbCAlMCIgOiAi
PW0iIChyZXQpIDogInQiIChpbnZhbCkgOiAic3QiKTsKICByZXR1cm4gcmV0Owp9Cgo=


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