Bug 26807 - [4.2 Regression] FAIL: gcc.dg/torture/pr24626-1.c -O2 (test for excess errors)
Summary: [4.2 Regression] FAIL: gcc.dg/torture/pr24626-1.c -O2 (test for excess errors)
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: middle-end (show other bugs)
Version: 4.2.0
: P1 blocker
Target Milestone: 4.2.0
Assignee: Maxim Kuvyrkov
URL:
Keywords: ice-on-valid-code
Depends on:
Blocks:
 
Reported: 2006-03-22 16:58 UTC by John David Anglin
Modified: 2006-06-19 16:35 UTC (History)
4 users (show)

See Also:
Host: hppa*-*-*
Target: hppa*-*-*
Build: hppa*-*-*
Known to work:
Known to fail:
Last reconfirmed: 2006-06-08 11:49:05


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description John David Anglin 2006-03-22 16:58:45 UTC
At -O2 and above,

Executing on host: /home/dave/gnu/gcc-4.2/objdir/gcc/xgcc -B/home/dave/gnu/gcc-4
.2/objdir/gcc/ /home/dave/gnu/gcc-4.2/gcc/gcc/testsuite/gcc.dg/torture/pr24626-1
.c   -O2   -fno-show-column -S  -o pr24626-1.s    (timeout = 300)
/home/dave/gnu/gcc-4.2/gcc/gcc/testsuite/gcc.dg/torture/pr24626-1.c: In function
 'F1':
/home/dave/gnu/gcc-4.2/gcc/gcc/testsuite/gcc.dg/torture/pr24626-1.c:27: internal
 compiler error: in check_cfg, at haifa-sched.c:4590
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
compiler exited with status 1
output is:
/home/dave/gnu/gcc-4.2/gcc/gcc/testsuite/gcc.dg/torture/pr24626-1.c: In function
 'F1':
/home/dave/gnu/gcc-4.2/gcc/gcc/testsuite/gcc.dg/torture/pr24626-1.c:27: internal
 compiler error: in check_cfg, at haifa-sched.c:4590
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.

FAIL: gcc.dg/torture/pr24626-1.c  -O2  (test for excess errors)
Comment 1 Andrew Pinski 2006-03-22 17:19:34 UTC
I bet this was caused by the IA64 scheduler improvements on 2006-03-16.
Comment 2 dave 2006-03-22 18:49:22 UTC
Subject: Re:  [4.2 Regression] FAIL: gcc.dg/torture/pr24626-1.c  -O2  (test for excess errors)

> I bet this was caused by the IA64 scheduler improvements on 2006-03-16.

That's probably a good candidate.  Results at Wed Mar 15 00:20:13 UTC
2006 (revision 112075M) are ok:
http://gcc.gnu.org/ml/gcc-testresults/2006-03/msg01027.html
Results at Fri Mar 17 16:26:46 UTC 2006 (revision 112175M) have
the bug: http://gcc.gnu.org/ml/gcc-testresults/2006-03/msg01211.html.

Dave
Comment 3 Joseph S. Myers 2006-04-04 19:22:16 UTC
Also seen on hppa2.0w-hp-hpux11.11, appearing between revisions 112080 and 112130:

FAIL: gcc.dg/torture/pr24626-1.c  -O2  (test for excess errors)
FAIL: gcc.dg/torture/pr24626-1.c  -O3 -fomit-frame-pointer  (test for excess errors)
FAIL: gcc.dg/torture/pr24626-1.c  -O3 -g  (test for excess errors)
FAIL: gcc.dg/torture/pr24626-1.c  -Os  (test for excess errors)
FAIL: gcc.dg/torture/pr24626-2.c  -O2  (test for excess errors)
FAIL: gcc.dg/torture/pr24626-2.c  -O3 -fomit-frame-pointer  (test for excess errors)
FAIL: gcc.dg/torture/pr24626-2.c  -O3 -g  (test for excess errors)
FAIL: gcc.dg/torture/pr24626-3.c  -O2  (test for excess errors)
FAIL: gcc.dg/torture/pr24626-3.c  -O3 -fomit-frame-pointer  (test for excess errors)
FAIL: gcc.dg/torture/pr24626-3.c  -O3 -g  (test for excess errors)
FAIL: gcc.dg/torture/pr24626-3.c  -Os  (test for excess errors)
Comment 4 John David Anglin 2006-04-20 23:37:11 UTC
4649                      else if (any_condjump_p (head))
4650                        gcc_assert (EDGE_COUNT (bb->succs) > 1
4651                                    && !BARRIER_P (NEXT_INSN (head)));

(gdb) p debug_rtx (head)
(jump_insn 20 18 30 2 (parallel [
            (set (pc)
                (if_then_else (eq (reg:SI 28 %r28)
                        (const_int 0 [0x0]))
                    (label_ref 30)
                    (pc)))
            (set (reg/v:SI 3 %r3 [orig:94 call_result ] [94])
                (reg:SI 28 %r28))
        ]) 231 {*pa.md:9084} (nil)
    (expr_list:REG_DEAD (reg:SI 28 %r28)
        (expr_list:REG_BR_PROB (const_int 10000 [0x2710])
            (nil))))

(gdb) p debug_rtx_list (head, 5)
(jump_insn 20 18 30 2 (parallel [
            (set (pc)
                (if_then_else (eq (reg:SI 28 %r28)
                        (const_int 0 [0x0]))
                    (label_ref 30)
                    (pc)))
            (set (reg/v:SI 3 %r3 [orig:94 call_result ] [94])
                (reg:SI 28 %r28))
        ]) 231 {*pa.md:9084} (nil)
    (expr_list:REG_DEAD (reg:SI 28 %r28)
        (expr_list:REG_BR_PROB (const_int 10000 [0x2710])
            (nil))))

(code_label 30 20 31 3 2 ("error_free_node") [1 uses])

(note 31 30 33 3 [bb 3] NOTE_INSN_BASIC_BLOCK)

(insn 33 31 34 3 (set (reg:SI 26 %r26 [ node ])
        (reg/v/f:SI 3 %r3 [orig:95 node ] [95])) 37 {*pa.md:2482} (nil)
    (nil))

(call_insn 34 33 40 3 (parallel [
            (set (reg:SI 28 %r28)
                (call (mem:SI (symbol_ref/v:SI ("@T") [flags 0x41] <function_decl 0x40090b80 T>) [0 S4 A32])
                    (const_int 16 [0x10])))
            (clobber (reg:SI 1 %r1))
            (clobber (reg:SI 2 %r2))
            (use (const_int 0 [0x0]))
        ]) 210 {call_val_symref} (nil)
    (expr_list:REG_DEAD (reg:SI 26 %r26 [ node ])
        (expr_list:REG_UNUSED (reg:SI 2 %r2)
            (expr_list:REG_UNUSED (reg:SI 1 %r1)
                (expr_list:REG_UNUSED (reg:SI 28 %r28)
                    (nil)))))
    (expr_list:REG_DEP_TRUE (use (reg:SI 26 %r26 [ node ]))
        (nil)))

(gdb) p *bb->succs
$16 = {base = {num = 1, alloc = 4, vec = {0x4009cb28}}}
Comment 5 John David Anglin 2006-04-21 21:03:18 UTC
The bug was introduced by r112128:
http://gcc.gnu.org/ml/gcc-cvs/2006-03/msg00547.html
Comment 6 Mark Mitchell 2006-06-04 18:18:57 UTC
Will this go away with the changes to make the scheduler not extend regions by default?
Comment 7 dave 2006-06-04 20:53:28 UTC
Subject: Re:  [4.2 Regression] FAIL: gcc.dg/torture/pr24626-1.c  -O2  (test for excess errors)

> Will this go away with the changes to make the scheduler not extend regions by
> default?

Can you provide the URL for the change?

Dave
Comment 8 dave 2006-06-04 22:40:16 UTC
Subject: Re:  [4.2 Regression] FAIL: gcc.dg/torture/pr24626-1.c  -O2  (test for excess errors)

> > Will this go away with the changes to make the scheduler not extend regions by
> > default?

Found it.  Testing <http://gcc.gnu.org/ml/gcc-patches/2006-06/msg00018.html>.

Dave
Comment 9 dave 2006-06-05 18:35:28 UTC
Subject: Re:  [4.2 Regression] FAIL: gcc.dg/torture/pr24626-1.c  -O2  (test for excess errors)

> Will this go away with the changes to make the scheduler not extend regions by
> default?

I tried the change but the same error still occurs:

pr24626-2.c:53: internal compiler error: in check_cfg, at haifa-sched.c:4651

Dave
Comment 10 Steve Ellcey 2006-06-06 21:02:48 UTC
Dave, in your last comment you said the patch didn't help but the failure you showed was for pr24626-2, not pr24626-1 (-2 vs. -1), which is what the original bug was about.  Is pr24626-1 failing for you?  It does not fail for me.  pr24626-1 is failing but has been failing for a couple of months on hppa1.1-hp-hpux11.11.
Comment 11 dave 2006-06-06 21:42:17 UTC
Subject: Re:  [4.2 Regression] FAIL: gcc.dg/torture/pr24626-1.c  -O2  (test for excess errors)

> Dave, in your last comment you said the patch didn't help but the failure you
> showed was for pr24626-2, not pr24626-1 (-2 vs. -1), which is what the original
> bug was about.  Is pr24626-1 failing for you?  It does not fail for me. 
> pr24626-1 is failing but has been failing for a couple of months on
> hppa1.1-hp-hpux11.11.

Oops, I didn't pay close enough attention.  The patch may provide
some improvement.  Without the change, we have the following fails
on 32-bit PA targets (same as reported by Joseph in comment #3):

FAIL: gcc.dg/torture/pr24626-1.c  -O2  (test for excess errors)
FAIL: gcc.dg/torture/pr24626-1.c  -O3 -fomit-frame-pointer  (test for excess err
ors)
FAIL: gcc.dg/torture/pr24626-1.c  -O3 -g  (test for excess errors)
FAIL: gcc.dg/torture/pr24626-1.c  -Os  (test for excess errors)
FAIL: gcc.dg/torture/pr24626-2.c  -O2  (test for excess errors)
FAIL: gcc.dg/torture/pr24626-2.c  -O3 -fomit-frame-pointer  (test for excess err
ors)
FAIL: gcc.dg/torture/pr24626-2.c  -O3 -g  (test for excess errors)
FAIL: gcc.dg/torture/pr24626-3.c  -O2  (test for excess errors)
FAIL: gcc.dg/torture/pr24626-3.c  -O3 -fomit-frame-pointer  (test for excess err
ors)
FAIL: gcc.dg/torture/pr24626-3.c  -O3 -g  (test for excess errors)
FAIL: gcc.dg/torture/pr24626-3.c  -Os  (test for excess errors)

All ICEs occur at the same spot.  I'd have to go back and retest
but I'm fairly certain they were all introduced at the same time
by r112128.

Dave
Comment 12 dave 2006-06-06 21:55:39 UTC
Subject: Re:  [4.2 Regression] FAIL: gcc.dg/torture/pr24626-1.c  -O2  (test for excess errors)

> All ICEs occur at the same spot.  I'd have to go back and retest
> but I'm fairly certain they were all introduced at the same time
> by r112128.

Note, this isn't the change that introduced
PARAM_MAX_SCHED_EXTEND_REGIONS_ITERS.  That was r112126.

Dave
Comment 13 dave 2006-06-07 13:53:15 UTC
Subject: Re:  [4.2 Regression] FAIL: gcc.dg/torture/pr24626-1.c  -O2  (test for excess errors)

> Oops, I didn't pay close enough attention.  The patch may provide
> some improvement.  Without the change, we have the following fails
> on 32-bit PA targets (same as reported by Joseph in comment #3):
> 
> FAIL: gcc.dg/torture/pr24626-1.c  -O2  (test for excess errors)
> FAIL: gcc.dg/torture/pr24626-1.c  -O3 -fomit-frame-pointer  (test for excess err
> ors)
> FAIL: gcc.dg/torture/pr24626-1.c  -O3 -g  (test for excess errors)
> FAIL: gcc.dg/torture/pr24626-1.c  -Os  (test for excess errors)
> FAIL: gcc.dg/torture/pr24626-2.c  -O2  (test for excess errors)
> FAIL: gcc.dg/torture/pr24626-2.c  -O3 -fomit-frame-pointer  (test for excess err
> ors)
> FAIL: gcc.dg/torture/pr24626-2.c  -O3 -g  (test for excess errors)
> FAIL: gcc.dg/torture/pr24626-3.c  -O2  (test for excess errors)
> FAIL: gcc.dg/torture/pr24626-3.c  -O3 -fomit-frame-pointer  (test for excess err
> ors)
> FAIL: gcc.dg/torture/pr24626-3.c  -O3 -g  (test for excess errors)
> FAIL: gcc.dg/torture/pr24626-3.c  -Os  (test for excess errors)

The problem isn't fixed by Maxim's commit.  This is what I see no
on hppa2.0w-hp-hpux11.11 and hppa-unknown-linux-gnu:

FAIL: gcc.dg/torture/pr24626-1.c  -O2  (internal compiler error)
FAIL: gcc.dg/torture/pr24626-1.c  -O2  (test for excess errors)
FAIL: gcc.dg/torture/pr24626-1.c  -O3 -fomit-frame-pointer  (internal compiler e
rror)
FAIL: gcc.dg/torture/pr24626-1.c  -O3 -fomit-frame-pointer  (test for excess err
ors)
FAIL: gcc.dg/torture/pr24626-1.c  -O3 -g  (internal compiler error)
FAIL: gcc.dg/torture/pr24626-1.c  -O3 -g  (test for excess errors)
FAIL: gcc.dg/torture/pr24626-1.c  -Os  (internal compiler error)
FAIL: gcc.dg/torture/pr24626-1.c  -Os  (test for excess errors)
FAIL: gcc.dg/torture/pr24626-2.c  -O2  (internal compiler error)
FAIL: gcc.dg/torture/pr24626-2.c  -O2  (test for excess errors)
FAIL: gcc.dg/torture/pr24626-2.c  -O3 -fomit-frame-pointer  (internal compiler e
rror)
FAIL: gcc.dg/torture/pr24626-2.c  -O3 -fomit-frame-pointer  (test for excess err
ors)
FAIL: gcc.dg/torture/pr24626-2.c  -O3 -g  (internal compiler error)
FAIL: gcc.dg/torture/pr24626-2.c  -O3 -g  (test for excess errors)
FAIL: gcc.dg/torture/pr24626-3.c  -O2  (internal compiler error)
FAIL: gcc.dg/torture/pr24626-3.c  -O2  (test for excess errors)
FAIL: gcc.dg/torture/pr24626-3.c  -O3 -fomit-frame-pointer  (internal compiler e
rror)
FAIL: gcc.dg/torture/pr24626-3.c  -O3 -fomit-frame-pointer  (test for excess err
ors)
FAIL: gcc.dg/torture/pr24626-3.c  -O3 -g  (internal compiler error)
FAIL: gcc.dg/torture/pr24626-3.c  -O3 -g  (test for excess errors)
FAIL: gcc.dg/torture/pr24626-3.c  -Os  (internal compiler error)
FAIL: gcc.dg/torture/pr24626-3.c  -Os  (test for excess errors)

Dave
Comment 14 Steve Ellcey 2006-06-07 15:24:09 UTC
This is odd.  In Monday nights run on hppa1.1-hp-hpux11.11 (r114420) I only see pr24626-2.c failing.  On Tuesday nights run (r114457) I see -1, -2, -and -3 failing like in comment #13.
Comment 15 Maxim Kuvyrkov 2006-06-08 11:49:05 UTC
haifa_sched.c: check_cfg () ICEs because a block with the conditional jump at the end has only 1 successor (the jump is to the next instruction).  I thought that this is invalid, but now I see that verify_flow_info () considers this correct.

I will post the patch soon.
Comment 16 Maxim Kuvyrkov 2006-06-13 09:01:13 UTC
Subject: Bug 26807

Author: mkuvyrkov
Date: Tue Jun 13 09:00:52 2006
New Revision: 114606

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=114606
Log:
2006-06-13  Maxim Kuvyrkov  <mkuvyrkov@ispras.ru>

	PR middle-end/26807
	* haifa-sched.c (check_cfg): Handle special case.

Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/haifa-sched.c

Comment 17 Maxim Kuvyrkov 2006-06-13 09:03:49 UTC
I tested this fix on a cross from i386-pc-linux-gnu and it did well on those three tests.  Can, please, someone check if the regressions gone on hppa?
Comment 18 Steve Ellcey 2006-06-19 15:53:55 UTC
My PA runs show no failures of the pr24626* tests anymore.  I think this problem has been resolved and the defect can be closed.
Comment 19 John David Anglin 2006-06-19 16:35:34 UTC
Fixed by patch.