Bug 33347 - [4.3 Regression] gcc.c-torture/compile/20000804-1.c ICEs at -O3 -funroll-loops
Summary: [4.3 Regression] gcc.c-torture/compile/20000804-1.c ICEs at -O3 -funroll-loops
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: target (show other bugs)
Version: 4.3.0
: P3 normal
Target Milestone: 4.3.0
Assignee: Andrew Pinski
URL:
Keywords: ice-on-valid-code
Depends on:
Blocks:
 
Reported: 2007-09-08 00:46 UTC by Andrew Pinski
Modified: 2007-09-28 22:42 UTC (History)
1 user (show)

See Also:
Host:
Target: spu-elf
Build:
Known to work:
Known to fail:
Last reconfirmed: 2007-09-20 23:09:58


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Pinski 2007-09-08 00:46:03 UTC
+FAIL: gcc.c-torture/compile/20000804-1.c  -O3 -fomit-frame-pointer -funroll-loops  (internal compiler error)
+FAIL: gcc.c-torture/compile/20000804-1.c  -O3 -fomit-frame-pointer -funroll-loops  (test for excess errors)
+FAIL: gcc.c-torture/compile/20000804-1.c  -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions  (internal compiler error)
+FAIL: gcc.c-torture/compile/20000804-1.c  -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions  (test for excess errors)

This showed up between revision 128143 and 128203
Comment 1 Andrew Pinski 2007-09-08 00:46:50 UTC
ICE:

/home/apinski/src/local/gcc/gcc/testsuite/gcc.c-torture/compile/20000804-1.c: In function 'f':^M
/home/apinski/src/local/gcc/gcc/testsuite/gcc.c-torture/compile/20000804-1.c:19: error: invalid rtl sharing found in the insn^M
(insn 261 260 262 2 /home/apinski/src/local/gcc/gcc/testsuite/gcc.c-torture/compile/20000804-1.c:19 (set (subreg:TI (reg:CDI 372) 0)^M
        (unspec:TI [^M
                (subreg:TI (reg:CDI 372) 0)^M
                (reg:TI 377)^M
                (reg:TI 376)^M
            ] 17)) -1 (nil))^M
/home/apinski/src/local/gcc/gcc/testsuite/gcc.c-torture/compile/20000804-1.c:19: error: shared rtx^M
(subreg:TI (reg:CDI 372) 0)^M
/home/apinski/src/local/gcc/gcc/testsuite/gcc.c-torture/compile/20000804-1.c:19: internal compiler error: internal consistency failure^M
Please submit a full bug report,^M
with preprocessed source if appropriate.^M
See <http://gcc.gnu.org/bugs.html> for instructions.^M
compiler exited with status 1
Comment 2 Andrew Pinski 2007-09-20 23:01:26 UTC
(gdb) p *pass
$1 = {name = 0x88ddc09 "dce", gate = 0x8745bef <gate_ud_dce>, execute = 0x8745b5c <rest_of_handle_ud_dce>, sub = 0x0,
  next = 0x89003e0, static_pass_number = 163, tv_id = 105, properties_required = 0, properties_provided = 0,
  properties_destroyed = 0, todo_flags_start = 524288, todo_flags_finish = 132099, letter = 119 'w'}
Comment 3 Andrew Pinski 2007-09-20 23:02:35 UTC
Ignore that the pass DCE just happens to have the checking after it.
Comment 4 Andrew Pinski 2007-09-20 23:09:58 UTC
Turns out this was a target issue, around line 640 of spu.c, we did:
    emit_insn (gen_selb (dst, dst, shift_reg, mask));

So I just added a copy_rtx around the dst.
Comment 5 Andrew Pinski 2007-09-28 22:41:35 UTC
Subject: Bug 33347

Author: pinskia
Date: Fri Sep 28 22:41:20 2007
New Revision: 128874

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=128874
Log:
2007-09-28  Andrew Pinski  <andrew_pinski@playstation.sony.com>

        PR target/33347
        * config/spu/spu.c (spu_expand_insv): Call copy_rtx on the second
        argument to gen_selb.


Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/config/spu/spu.c

Comment 6 Andrew Pinski 2007-09-28 22:42:15 UTC
Fixed.