public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
From: hakonrk@fys.uio.no
To: gcc-gnats@gcc.gnu.org
Subject: c/7267: GCC 3.1 crash when using MMX code and -funroll-loops
Date: Wed, 10 Jul 2002 16:36:00 -0000	[thread overview]
Message-ID: <20020710232719.11656.qmail@s.hn.org> (raw)


>Number:         7267
>Category:       c
>Synopsis:       GCC 3.1 crash when using MMX code and -funroll-loops
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          ice-on-legal-code
>Submitter-Id:   net
>Arrival-Date:   Wed Jul 10 16:36:00 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     Haakon Riiser
>Release:        3.1
>Organization:
University of Oslo
>Environment:
System: Linux s 2.4.18 #2 Thu Jun 6 00:23:32 CEST 2002 i686 unknown
Architecture: i686

host: i686-pc-linux-gnu
build: i686-pc-linux-gnu
target: i686-pc-linux-gnu
configured with: /local/build/gcc/gcc-3.1/configure --prefix=/usr/local/gcc-3.1 --enable-languages=c --disable-nls

Also verified o
>Description:
When compiling the code shown in "How-To-Repeat" with optimization
and unroll-loops enabled, GCC 3.1 dies with an internal compiler
error.  The bug looks exactly the same in GCC 2.96 from Red Hat
Linux 7.2 and 7.3, but GCC 2.95.3 produces the following output:

foo.c: In function `foo':
foo.c:7: invalid `asm': invalid expression as operand
foo.c:8: invalid `asm': invalid expression as operand
foo.c:7: invalid `asm': invalid expression as operand
foo.c:8: invalid `asm': invalid expression as operand

The code compiles perfectly with all tested GCC versions when
"-funroll-loops" is not used.
>How-To-Repeat:
Compile with "gcc -c -O -funroll-loops foo.c".  Preprocessor
output follows:

# 1 "foo.c"
void
foo(char *dst, int w)
{
        int i;

        for (i = 0; i < 2; i++) {
                asm volatile ("movq %%mm0, %0\n" : "=X" (*(dst + w * 2)));
                asm volatile ("movq %%mm0, %0\n" : "=X" (*(dst + w * 2)));
                dst++;
        }
        asm volatile ("emms\n");
}
>Fix:
Work-around: Don't use -funroll-loops.
>Release-Note:
>Audit-Trail:
>Unformatted:


             reply	other threads:[~2002-07-10 23:36 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-07-10 16:36 hakonrk [this message]
2002-10-03 11:00 hubicka

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=20020710232719.11656.qmail@s.hn.org \
    --to=hakonrk@fys.uio.no \
    --cc=gcc-gnats@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).