public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "ncahill_alt at yahoo dot com" <gcc-bugzilla@gcc.gnu.org>
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	[thread overview]
Message-ID: <bug-53482-4@http.gcc.gnu.org/bugzilla/> (raw)

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.


             reply	other threads:[~2012-05-24 21:50 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-24 22:13 ncahill_alt at yahoo dot com [this message]
2012-05-25  7:53 ` [Bug rtl-optimization/53482] " jakub at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-53482-4@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).