From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19047 invoked by alias); 1 Jun 2002 20:16:03 -0000 Mailing-List: contact gcc-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-prs-owner@gcc.gnu.org Received: (qmail 19010 invoked by uid 71); 1 Jun 2002 20:16:01 -0000 Resent-Date: 1 Jun 2002 20:16:01 -0000 Resent-Message-ID: <20020601201601.19009.qmail@sources.redhat.com> Resent-From: gcc-gnats@gcc.gnu.org (GNATS Filer) Resent-To: nobody@gcc.gnu.org Resent-Cc: gcc-prs@gcc.gnu.org, gcc-bugs@gcc.gnu.org, camm@enhanced.com Resent-Reply-To: gcc-gnats@gcc.gnu.org, 73065@bugs.debian.org Received:(qmail 18321 invoked from network); 1 Jun 2002 20:12:32 -0000 Received: from unknown (HELO hirsch.in-berlin.de) (192.109.42.6) by sources.redhat.com with SMTP; 1 Jun 2002 20:12:32 -0000 Received: from gate.local (mail@dsl-213-023-043-144.arcor-ip.net [213.23.43.144]) by hirsch.in-berlin.de (8.12.1/8.12.1/Debian -2) with ESMTP id g51KCUFR031158; Sat, 1 Jun 2002 22:12:31 +0200 Received: from doko by gate.local with local (Exim 3.35 #1 (Debian)) id 17EFC0-0006XZ-00; Sat, 01 Jun 2002 22:09:40 +0200 Message-Id: Date: Sat, 01 Jun 2002 13:16:00 -0000 From: Matthias Klose Reply-To: 73065@bugs.debian.org To: gcc-gnats@gcc.gnu.org, debian-gcc@lists.debian.org X-Send-Pr-Version:3.113 X-GNATS-Notify:camm@enhanced.com Subject: c/6897: Code produced with -fPIC reserves EBX, but compiles bad __asm__ anyway X-SW-Source: 2002-06/txt/msg00015.txt.bz2 List-Id: >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: