From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1623 invoked by alias); 24 May 2012 21:50:05 -0000 Received: (qmail 1610 invoked by uid 22791); 24 May 2012 21:50:04 -0000 X-SWARE-Spam-Status: No, hits=-3.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00,TW_CX,TW_GC,TW_GX X-Spam-Check-By: sourceware.org Received: from localhost (HELO gcc.gnu.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 24 May 2012 21:49:51 +0000 From: "ncahill_alt at yahoo dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug rtl-optimization/53482] New: -mtune=pentium[pro, 2, 3, 4], insn does not satisfy constraints Date: Thu, 24 May 2012 22:13:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: rtl-optimization X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: ncahill_alt at yahoo dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2012-05/txt/msg02433.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53482 Bug #: 53482 Summary: -mtune=pentium[pro, 2, 3, 4], insn does not satisfy constraints Classification: Unclassified Product: gcc Version: 4.7.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: rtl-optimization AssignedTo: unassigned@gcc.gnu.org ReportedBy: ncahill_alt@yahoo.com This error cropped up today with gcc 4.7.0, but it only occurs with this combination of flags: gcc -O2 -fPIC -mtune=pentium[pro,2,3,4] -c source.c -o source.o There seems to be no error with -O1, without -fPIC, or with other mtune settings. Here is the test case. What is interesting is, replacing "i = 0" with "i = 1" is enough to stop the error occurring. ### source.c ### unsigned char uc; void fa() { unsigned char i, a; a = fb(); fc(); uc += a; for (i = 0; i < uc;) { fd(); } } ### error message ### source.c: In function 'fa': source.c:14:1: error: insn does not satisfy its constraints: (insn 58 9 14 2 (parallel [ (set (reg:CCZ 17 flags) (compare:CCZ (plus:QI (mem/c:QI (reg/f:SI 4 si [68]) [0 uc+0 S1 A8]) (reg:QI 5 di [orig:59 D.1370 ] [59])) (const_int 0 [0]))) (set (mem/c:QI (reg/f:SI 4 si [68]) [0 uc+0 S1 A8]) (plus:QI (mem/c:QI (reg/f:SI 4 si [68]) [0 uc+0 S1 A8]) (reg:QI 5 di [orig:59 D.1370 ] [59]))) ]) source.c:10 199 {*addqi_2} (nil)) source.c:14:1: internal compiler error: in copyprop_hardreg_forward_1, at regcprop.c:767 ### gcc -v ### Using built-in specs. COLLECT_GCC=/usr/i686-pc-linux-gnu/gcc-bin/4.7.0/gcc COLLECT_LTO_WRAPPER=/usr/libexec/gcc/i686-pc-linux-gnu/4.7.0/lto-wrapper Target: i686-pc-linux-gnu Configured with: ../gcc-4.7.0/configure --disable-bootstrap --disable-libada --disable-ld --disable-gold --enable-lto --enable-libssp --enable-cloog-backend=isl --without-cloog --prefix=/usr --bindir=/usr/i686-pc-linux-gnu/gcc-bin/4.7.0 --includedir=/usr/lib/gcc/i686-pc-linux-gnu/4.7.0/include --datadir=/usr/share/gcc-data/i686-pc-linux-gnu/4.7.0 --mandir=/usr/share/gcc-data/i686-pc-linux-gnu/4.7.0/man --infodir=/usr/share/gcc-data/i686-pc-linux-gnu/4.7.0/info --with-gxx-include-dir=/usr/lib/gcc/i686-pc-linux-gnu/4.7.0/include/g++-v4 --host=i686-pc-linux-gnu --build=i686-pc-linux-gnu --disable-altivec --disable-fixed-point --without-ppl --enable-nls --without-included-gettext --with-system-zlib --disable-werror --enable-secureplt --disable-multilib --enable-libmudflap --disable-libgomp --with-python-dir=/share/gcc-data/i686-pc-linux-gnu/4.7.0/python --enable-checking=release --disable-libgcj --enable-languages=c,c++,fortran,lto --enable-shared --enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu --with-bugurl=http://bugs.gentoo.org/ Thread model: posix gcc version 4.7.0 (GCC) The workaround is to use -mtune=i686 instead. Thank you. Neil.