Bug 22469 - [4.1 regression] testsuite failure, gcc.c-torture/compile/941014-2.c -O3 loops
Summary: [4.1 regression] testsuite failure, gcc.c-torture/compile/941014-2.c -O3 loops
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: rtl-optimization (show other bugs)
Version: 4.1.0
: P5 normal
Target Milestone: 4.1.0
Assignee: Not yet assigned to anyone
URL:
Keywords: ice-on-valid-code
Depends on:
Blocks: 15023
  Show dependency treegraph
 
Reported: 2005-07-13 20:44 UTC by Hans-Peter Nilsson
Modified: 2005-11-14 01:42 UTC (History)
1 user (show)

See Also:
Host: x86_64-unknown-linux-gnu
Target: mmix-knuth-mmixware
Build:
Known to work:
Known to fail:
Last reconfirmed: 2005-10-24 00:07:07


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Hans-Peter Nilsson 2005-07-13 20:44:46 UTC
With "Wed Jul 13 00:19:06 UTC 2005" this test passed.
With "Wed Jul 13 13:14:33 UTC 2005" it fails:

Running
/home/hp/combined/combined/gcc/testsuite/gcc.c-torture/compile/compile.exp ...
FAIL: gcc.c-torture/compile/941014-2.c  -O3 -fomit-frame-pointer -funroll-loops
 (test for excess errors)
FAIL: gcc.c-torture/compile/941014-2.c  -O3 -fomit-frame-pointer
-funroll-all-loops -finline-functions  (test for excess errors)

The message in gcc.log points at a RTL failure (basic block register liveness
inconsistency):
/home/hp/combined/combined/gcc/testsuite/gcc.c-torture/compile/941014-2.c: In
function 'f':^M
/home/hp/combined/combined/gcc/testsuite/gcc.c-torture/compile/941014-2.c:37:
fatal error: internal consistency failure^M

(gdb) bt
#0  fatal_error (gmsgid=0x79be62 "internal consistency failure")
    at /home/hp/combined/combined/gcc/diagnostic.c:512
#1  0x00000000005a9812 in verify_local_live_at_start (new_live_at_start=0xa02170,
    bb=0x2aaaad9ed900) at /home/hp/combined/combined/gcc/flow.c:495
#2  0x00000000005ab56e in update_life_info (blocks=0x0,
extent=UPDATE_LIFE_LOCAL, prop_flags=0)
    at /home/hp/combined/combined/gcc/flow.c:680
#3  0x00000000007339f7 in regrename_optimize () at
/home/hp/combined/combined/gcc/regrename.c:359
#4  0x00000000007346f5 in rest_of_handle_regrename ()
    at /home/hp/combined/combined/gcc/regrename.c:1925
#5  0x0000000000691a16 in execute_one_pass (pass=0x946a40)
    at /home/hp/combined/combined/gcc/passes.c:774
#6  0x0000000000691b3c in execute_pass_list (pass=0x946a40)
    at /home/hp/combined/combined/gcc/passes.c:806
#7  0x0000000000691b4e in execute_pass_list (pass=0x93f700)
    at /home/hp/combined/combined/gcc/passes.c:807
#8  0x0000000000691b4e in execute_pass_list (pass=0x93f760)
    at /home/hp/combined/combined/gcc/passes.c:807
#9  0x000000000048317e in tree_rest_of_compilation (fndecl=0x2aaaad9db800)
    at /home/hp/combined/combined/gcc/tree-optimize.c:420
#10 0x0000000000415726 in c_expand_body (fndecl=0x2aaaad9db800)
    at /home/hp/combined/combined/gcc/c-decl.c:6604
#11 0x00000000006bc828 in cgraph_expand_function (node=0x2aaaad9e8630)
    at /home/hp/combined/combined/gcc/cgraphunit.c:1033
#12 0x00000000006bd551 in cgraph_optimize () at
/home/hp/combined/combined/gcc/cgraphunit.c:1099
#13 0x0000000000417a1d in c_write_global_declarations ()
    at /home/hp/combined/combined/gcc/c-decl.c:7589
#14 0x0000000000665138 in toplev_main (argc=Variable "argc" is not available.
) at /home/hp/combined/combined/gcc/toplev.c:988

(gdb) p bb
$1 = 0x2aaaad9ed900
(gdb) pbb
During symbol reading, Incomplete CFI data; unspecified register rax at
0x00000000005a96a1.
During symbol reading, Incomplete CFI data; unspecified register rdx at
0x00000000005a96a1.
During symbol reading, Incomplete CFI data; unspecified register rcx at
0x00000000005a96a1.
During symbol reading, Incomplete CFI data; unspecified register rsi at
0x00000000005a96a1.
During symbol reading, Incomplete CFI data; unspecified register rdi at
0x00000000005a96a1.
;; basic block 1, loop depth 0, count 0
;; prev block 0, next block 2
;; pred:       0 [90.0%]  (fallthru)
;; succ:       2 (fallthru) 4 [100.0%]
;; Registers live at start:  0 [$0] 2 [$2] 3 [$3] 15 [$15] 254 [$254] 259 [rJ]
(note 29 27 30 1 [bb 1] NOTE_INSN_BASIC_BLOCK)
(insn 30 29 31 1 (set (reg:DI 16 $16 [orig:303 lsm_tmp::27 ] [303])
        (mem:DI (reg/v/f:DI 0 $0 [orig:307 pDst ] [307]) [2 S8 A64])) 3 {movdi}
(nil)
    (expr_list:REG_DEAD (reg/v/f:DI 0 $0 [orig:307 pDst ] [307])
        (nil)))
(insn 31 30 33 1 (set (reg:DI 21 $21 [328])
        (minus:DI (reg:DI 3 $3 [orig:321 ppt ] [321])
            (reg:DI 2 $2 [orig:323 xrot ] [323]))) 9 {subdi3} (nil)
    (expr_list:REG_DEAD (reg:DI 2 $2 [orig:323 xrot ] [323])
        (nil)))
(insn 33 31 34 1 (set (reg:DI 20 $20 [330])
        (ashift:DI (reg:DI 21 $21 [328])
            (const_int 32 [0x20]))) 22 {ashldi3} (insn_list:REG_DEP_TRUE 31 (nil))
    (expr_list:REG_DEAD (reg:DI 21 $21 [328])
        (nil)))
(insn 34 33 35 1 (set (reg:DI 19 $19 [546])
        (ashiftrt:DI (reg:DI 20 $20 [330])
            (const_int 32 [0x20]))) 23 {ashrdi3} (insn_list:REG_DEP_TRUE 33 (nil))
    (expr_list:REG_DEAD (reg:DI 20 $20 [330])
        (nil)))
(note 35 34 37 1 NOTE_INSN_DELETED)
(note 37 35 39 1 NOTE_INSN_DELETED)
(note 39 37 961 1 NOTE_INSN_DELETED)
(insn 961 39 963 1 (set (reg:DI 18 $18 [545])
        (const_int 0 [0x0])) 3 {movdi} (nil)
    (expr_list:REG_EQUIV (const_int 0 [0x0])
        (nil)))
(insn 963 961 40 1 (set (reg:DI 2 $2)
        (reg:DI 19 $19 [546])) 3 {movdi} (nil)
    (expr_list:REG_DEAD (reg:DI 19 $19 [546])
        (nil)))
(insn 40 963 41 1 (parallel [
            (set (reg:DI 17 $17 [547])
                (mod:DI (reg:DI 2 $2)
                    (reg:DI 18 $18 [545])))
            (clobber (reg:DI 2 $2))
            (clobber (reg:DI 18 $18 [545]))
            (clobber (reg:DI 260 rR))
        ]) 21 {*moddi3_nonknuth} (insn_list:REG_DEP_TRUE 36
(insn_list:REG_DEP_TRUE 34 (nil)))
    (expr_list:REG_DEAD (reg:DI 2 $2)
        (expr_list:REG_DEAD (reg:DI 18 $18 [545])
            (expr_list:REG_UNUSED (reg:DI 260 rR)
                (expr_list:REG_UNUSED (reg:DI 18 $18 [545])
                    (expr_list:REG_UNUSED (reg:DI 2 $2)
                        (nil)))))))
(note 41 40 42 1 NOTE_INSN_DELETED)
(jump_insn 42 41 875 1 (set (pc)
        (if_then_else (ge (reg:DI 17 $17 [547])
                (const_int 0 [0x0]))
            (label_ref:DI 237)
            (pc))) 51 {*bCC_foldable} (insn_list:REG_DEP_TRUE 40 (nil))
    (expr_list:REG_DEAD (reg:DI 17 $17 [547])
        (expr_list:REG_BR_PROB (const_int 10000 [0x2710])
            (nil))))
;; Registers live at end:  1 [$1] 3 [$3] 15 [$15] 16 [$16] 254 [$254] 259 [rJ]
Comment 1 Andrew Pinski 2005-07-13 23:41:50 UTC
15023 is the bug for rename-registers being buggy.
Comment 2 Andrew Pinski 2005-07-13 23:43:27 UTC
This is obvious caused by:
+2005-07-12  Zdenek Dvorak  <dvorakz@suse.cz>
+
+       PR rtl-optimization/20376
+       * toplev.c (process_options): Enable -fweb and -frename-registers when
+       unrolling.
+       * doc/invoke.texi: Update the information about when -fweb and
+       -frename-registers are enabled.
+
Comment 3 Andrew Pinski 2005-07-13 23:47:53 UTC
Question is does this fail on the 3.3 (or 3.4) branch where -frename-registers is enabled at -O3?
Comment 4 Andrew Pinski 2005-09-16 17:54:30 UTC
MMIX is not a primary or secondary target. 
Comment 5 Hans-Peter Nilsson 2005-10-24 00:07:07 UTC
Reconfirmation with "Mon Oct 17 15:28:21 UTC 2005".
Comment 6 Hans-Peter Nilsson 2005-11-14 01:18:25 UTC
Fixed by unknown patch between "Wed Nov  9 10:21:03 UTC 2005 (revision 106681M)"
and "Wed Nov  9 21:45:22 UTC 2005 (revision 106710M)".
Comment 7 Andrew Pinski 2005-11-14 01:42:17 UTC
(In reply to comment #6)
> Fixed by unknown patch between "Wed Nov  9 10:21:03 UTC 2005 (revision
> 106681M)"
> and "Wed Nov  9 21:45:22 UTC 2005 (revision 106710M)".

Most likely by:
2005-11-09  Andreas Krebbel  <krebbel1@de.ibm.com>

        PR 24034
        * flow.c (mark_set_1): Handle CLOBBERs like SETs if the register
        is live afterwards.