public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: c/7267: GCC 3.1 crash when using MMX code and -funroll-loops
@ 2002-10-03 11:00 hubicka
  0 siblings, 0 replies; 2+ messages in thread
From: hubicka @ 2002-10-03 11:00 UTC (permalink / raw)
  To: gcc-bugs, gcc-prs, hakonrk, nobody

Synopsis: GCC 3.1 crash when using MMX code and -funroll-loops

State-Changed-From-To: open->closed
State-Changed-By: hubicka
State-Changed-When: Thu Oct  3 11:00:06 2002
State-Changed-Why:
    Your code is buggy - use "=x" constraint for MMX registers

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


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

* c/7267: GCC 3.1 crash when using MMX code and -funroll-loops
@ 2002-07-10 16:36 hakonrk
  0 siblings, 0 replies; 2+ messages in thread
From: hakonrk @ 2002-07-10 16:36 UTC (permalink / raw)
  To: gcc-gnats


>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:


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

end of thread, other threads:[~2002-10-03 18:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-10-03 11:00 c/7267: GCC 3.1 crash when using MMX code and -funroll-loops hubicka
  -- strict thread matches above, loose matches on Subject: below --
2002-07-10 16:36 hakonrk

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