Bug 8412 - Code generation problem with -march=k6
Summary: Code generation problem with -march=k6
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: rtl-optimization (show other bugs)
Version: 3.2
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords: ice-on-valid-code
Depends on:
Blocks:
 
Reported: 2002-10-31 02:56 UTC by alexander.puchmayr
Modified: 2003-07-25 17:33 UTC (History)
3 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments
syntax.i (16.56 KB, text/x-c)
2003-05-21 15:17 UTC, alexander.puchmayr
Details

Note You need to log in before you can comment on or make changes to this bug.
Description alexander.puchmayr 2002-10-31 02:56:01 UTC
The attached file (from xine-lib-0.9.13-r1), src/libfaad/syntax.i produces an ICE when compiling with -march=k6 and -funroll-loops. The file compiles fine with
-march=i586, athlon, athlon-xp, i686, pentium4, this it seems to be a k6 related problem.

Error-Message:

syntax.c: In function `section_data':
syntax.c:804: unrecognizable insn:
(insn 863 880 865 (set (reg:SI 280)
        (zero_extend:SI (reg/v:QI 74))) -1 (nil)
    (nil))
syntax.c:804: Internal compiler error in extract_insn, at recog.c:2148
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions.

Release:
gcc version 3.2

Environment:
i586

How-To-Repeat:
invoke gcc3-2 with:

gcc -march=k6 -O3 -funroll-loops -c syntax.i
Comment 1 alexander.puchmayr 2002-10-31 02:56:01 UTC
Fix:
Use i586 instead of k6
Comment 2 Paolo Carlini 2002-10-31 04:07:05 UTC
State-Changed-From-To: open->closed
State-Changed-Why: Cannot be reproduced with current 3.2.1 pre and 3.3 exp.
Comment 3 jb 2003-01-28 01:59:40 UTC
From: Jim Bray <jb@as220.org>
To: gcc-gnats@gcc.gnu.org, gcc-bugs@gcc.gnu.org, nobody@gcc.gnu.org,  gcc-prs@gcc.gnu.org, alexander.puchmayr@jku.at
Cc:  
Subject: Re: optimization/8412: Code generation problem with -march=k6
Date: 28 Jan 2003 01:59:40 -0500

   I think I'm seeing this same bug, with 
 gcc version 3.2.1 20021207 (Gentoo Linux 3.2.1-20021207)
  I've noticed considerable instability with multimedia things including
 xine, and have been studying an easily reproducible problem with
 xmms. I'd assumed it was 3dnow related, but testing has zeroed me in
 on a combination of -funroll-all-loops and -O[23].
 
   Here are my crude notes to date. Not yet a good bug-report,
 
 The test is compiling and running xmms and doing a particular
 operation with it. My system is a k6-2.
 
 -finline-functions is used in all tests.
 
 CFLAGS='-march=k6-2 -g -O1' works.
 CFLAGS='-march=k6-2 -g -O1 -ffast-math' works.
 CFLAGS='-march=k6-2 -g -O1 -ffast-math -funroll-all-loops' works.
 CFLAGS='-march=k6-2 -g -O2 -ffast-math -funroll-all-loops' FAILS.
 CFLAGS='-march=k6-2 -g -O2 -ffast-math' works.
 CFLAGS='-march=k6-2 -O2 -ffast-math' works.
 
   The xmms configuration normally uses -funroll-all-loops, and
 I was seeing consistent failure with any variant of -m{cpu,arch}=
 {k6,k6-2} -O[23], which is not reflected above. The problem went
 away when the k6-specific flags were removed. I did not start
 getting any k6-specific build successes until I started dropping
 below -O2 and -funroll-all-loops.
 
   I did some studying of this with gdb, which seemed to be zeroing me
 into an area of code which became an unrolled loop.
 
  Bug I 'sent email to interested parties' from:
 
 http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=8412
 
 
 -- 
 Jim Bray <jb@as220.org>
 

Comment 4 jb 2003-01-28 09:48:33 UTC
From: Jim Bray <jb@as220.org>
To: gcc-gnats@gcc.gnu.org, gcc-bugs@gcc.gnu.org, nobody@gcc.gnu.org
Cc:  
Subject: [Re: optimization/8412: Code generation problem with -march=k6
Date: 28 Jan 2003 09:48:33 -0500

   I think I'm seeing this same bug, with 
 gcc version 3.2.1 20021207 (Gentoo Linux 3.2.1-20021207)
  I've noticed considerable instability with multimedia things including
 xine, and have been studying an easily reproducible problem with
 xmms. I'd assumed it was 3dnow related, but testing has zeroed me in
 on a combination of -funroll-all-loops and -O[23].
 
   Here are my crude notes to date. Not yet a good bug-report,
 
 The test is compiling and running xmms and doing a particular
 operation with it. My system is a k6-2.
 
 -finline-functions is used in all tests.
 
 CFLAGS='-march=k6-2 -g -O1' works.
 CFLAGS='-march=k6-2 -g -O1 -ffast-math' works.
 CFLAGS='-march=k6-2 -g -O1 -ffast-math -funroll-all-loops' works.
 CFLAGS='-march=k6-2 -g -O2 -ffast-math -funroll-all-loops' FAILS.
 CFLAGS='-march=k6-2 -g -O2 -ffast-math' works.
 CFLAGS='-march=k6-2 -O2 -ffast-math' works.
 
   The xmms configuration normally uses -funroll-all-loops, and
 I was seeing consistent failure with any variant of -m{cpu,arch}=
 {k6,k6-2} -O[23], which is not reflected above. The problem went
 away when the k6-specific flags were removed. I did not start
 getting any k6-specific build successes until I started dropping
 below -O2 and -funroll-all-loops.
 
   I did some studying of this with gdb, which seemed to be zeroing me
 into an area of code which became an unrolled loop.
 
  Bug I 'sent email to interested parties' from:
 
 http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=8412
 
 
 -- 
 Jim Bray <jb@as220.org>
 -- 
 Jim Bray <jb@as220.org>