public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: c/6897: Code produced with -fPIC reserves EBX, but compiles bad __asm__ anyway
@ 2002-12-19  9:25 ebotcazou
  0 siblings, 0 replies; 2+ messages in thread
From: ebotcazou @ 2002-12-19  9:25 UTC (permalink / raw)
  To: 73065, camm, gcc-bugs, gcc-prs, nobody

Synopsis: Code produced with -fPIC reserves EBX, but compiles bad __asm__ anyway

State-Changed-From-To: open->closed
State-Changed-By: ebotcazou
State-Changed-When: Thu Dec 19 09:25:07 2002
State-Changed-Why:
    Implemented on mainline (which will likely becomes gcc 3.4).

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=6897


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

* c/6897: Code produced with -fPIC reserves EBX, but compiles bad __asm__ anyway
@ 2002-06-01 13:16 Matthias Klose
  0 siblings, 0 replies; 2+ messages in thread
From: Matthias Klose @ 2002-06-01 13:16 UTC (permalink / raw)
  To: gcc-gnats, debian-gcc


>Number:         6897
>Category:       c
>Synopsis:       Code produced with -fPIC reserves EBX, but compiles bad __asm__ anyway
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    unassigned
>State:          open
>Class:          accepts-illegal
>Submitter-Id:   net
>Arrival-Date:   Sat Jun 01 13:16:00 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     camm@enhanced.com
>Release:        3.1 (Debian) (Debian unstable)
>Organization:
The Debian Project
>Environment:
System: Debian GNU/Linux (unstable)
Architecture: i686
	
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Installed/Config-files/Unpacked/Failed-config/Half-installed
|/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err: uppercase=bad)
||/ Name           Version        Description
+++-==============-==============-============================================
ii  gcc-3.1        3.1-2          The GNU C compiler.
ii  g++-3.1        3.1-2          The GNU C++ compiler.
ii  libstdc++4     3.1-2          The GNU stdc++ library version 3
ii  libstdc++4-dev 3.1-2          The GNU stdc++ library version 3 (developmen
ii  binutils       2.12.90.0.7-1  The GNU assembler, linker and binary utiliti
ii  libc6          2.2.5-6        GNU C Library: Shared libraries and Timezone
host: i386-linux
configured with: /mnt/data/gcc-3.1/gcc-3.1-3.1ds2/src/configure -v --enable-languages=c,c++,java,f77,proto,objc,ada --prefix=/usr --mandir=$\(prefix\)/share/man --infodir=$\(prefix\)/share/info --with-gxx-include-dir=$\(prefix\)/include/g++-v3-3.1 --enable-shared --with-system-zlib --enable-long-long --enable-nls --without-included-gettext --enable-clocale=gnu --enable-threads=posix --enable-java-gc=boehm --enable-objc-gc i386-linux
>Description:
[ Reported to the Debian BTS as report #73065.
  Please CC 73065@bugs.debian.org on replies.
  Log of report can be found at http://bugs.debian.org/73065 ]

According to the bug submitter, both files should fail to compile with
the same warning. He has produced verifiably incorrect asm code using
the latter syntax. Rechecked with gcc-3.1.

intech20:/tmp$ cat foo.c
int
main(int argc,char * argv[]) {

  int i=0;

  __asm__ __volatile__ ("addl $1,%%ebx\n\t" : : "b" (i));

}
intech20:/tmp$ cc -fPIC foo.c -o foo
foo.c: In function `main':
foo.c:6: Invalid `asm' statement:
foo.c:6: fixed or forbidden register 3 (bx) was spilled for class BREG.
intech20:/tmp$ cat foo1.c
int
main(int argc,char * argv[]) {

  int i=0;

  __asm__ __volatile__ ("addl $1,%%ebx\n\t" : : "a" (i) : "ebx");

}
intech20:/tmp$ cc -fPIC foo1.c -o foo
intech20:/tmp$ 
>How-To-Repeat:
	
>Fix:
	
>Release-Note:
>Audit-Trail:
>Unformatted:


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

end of thread, other threads:[~2002-12-19 17:25 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-12-19  9:25 c/6897: Code produced with -fPIC reserves EBX, but compiles bad __asm__ anyway ebotcazou
  -- strict thread matches above, loose matches on Subject: below --
2002-06-01 13:16 Matthias Klose

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).