Bug 55167 - [4.8 Regression]: g++.dg/other/vector-compare.C, ICE
Summary: [4.8 Regression]: g++.dg/other/vector-compare.C, ICE
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: regression (show other bugs)
Version: 4.8.0
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords: ice-on-valid-code
Depends on: 55001
Blocks:
  Show dependency treegraph
 
Reported: 2012-11-01 18:46 UTC by Hans-Peter Nilsson
Modified: 2012-11-02 08:30 UTC (History)
0 users

See Also:
Host: x86_64-unknown-linux-gnu
Target: cris-axis-elf
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Hans-Peter Nilsson 2012-11-01 18:46:50 UTC
This test previously passed, now it fails.
A patch in the revision range (last_known_working:first_known_failing) 192985:192991
exposed or caused this regression.  Since then it fails as follows:

Running /tmp/hpautotest-gcc0/gcc/gcc/testsuite/g++.dg/dg.exp ...
FAIL: g++.dg/other/vector-compare.C (internal compiler error)
FAIL: g++.dg/other/vector-compare.C (test for excess errors)

In g++.log:

Executing on host: /tmp/hpautotest-gcc0/cris-elf/gccobj/gcc/testsuite/g++/../../g++ -B/tmp/hpautotest-gcc0/cris-elf/gccobj/gcc/testsuite/g++/../../ /tmp/hpautotest-gcc0/gcc/gcc/testsuite/g++.dg/other/vector-compare.C  -fno-diagnostics-show-caret  -nostdinc++ -I/tmp/hpautotest-gcc0/cris-elf/gccobj/cris-elf/libstdc++-v3/include/cris-elf -I/tmp/hpautotest-gcc0/cris-elf/gccobj/cris-elf/libstdc++-v3/include -I/tmp/hpautotest-gcc0/gcc/libstdc++-v3/libsupc++ -I/tmp/hpautotest-gcc0/gcc/libstdc++-v3/include/backward -I/tmp/hpautotest-gcc0/gcc/libstdc++-v3/testsuite/util -fmessage-length=0  -std=gnu++11 -Wall  -S   -isystem /tmp/hpautotest-gcc0/cris-elf/gccobj/cris-elf/./newlib/targ-include -isystem /tmp/hpautotest-gcc0/gcc/newlib/libc/include  -o vector-compare.s    (timeout = 300)
/tmp/hpautotest-gcc0/gcc/gcc/testsuite/g++.dg/other/vector-compare.C: In function 'int main()':

/tmp/hpautotest-gcc0/gcc/gcc/testsuite/g++.dg/other/vector-compare.C:30:21: internal compiler error: Segmentation fault

0x9fc565 crash_signal

	/tmp/hpautotest-gcc0/gcc/gcc/toplev.c:333

0x802f65 force_operand(rtx_def*, rtx_def*)

	/tmp/hpautotest-gcc0/gcc/gcc/expr.c:6975

0x743ac0 expand_gimple_stmt_1

	/tmp/hpautotest-gcc0/gcc/gcc/cfgexpand.c:2168

0x743ac0 expand_gimple_stmt

	/tmp/hpautotest-gcc0/gcc/gcc/cfgexpand.c:2204

0x744b39 expand_gimple_basic_block

	/tmp/hpautotest-gcc0/gcc/gcc/cfgexpand.c:3979

0x746276 gimple_expand_cfg

	/tmp/hpautotest-gcc0/gcc/gcc/cfgexpand.c:4498


According to <http://gcc.gnu.org/ml/gcc-patches/2012-10/msg02858.html>, this also happens for i686-linux and revision r192986 is to blame.

Author of suspect patch CC:ed.
Comment 1 Marc Glisse 2012-11-01 19:05:13 UTC
Thanks.

Since the error happens in expand, I assume this is a dup of PR 55001, for which I posted a patch earlier today. Note that AFAIK, anything that starts failing because of this patch was silently miscompiled before.

(I am also investigating a different problem with this testcase, due to the fact that the C front-end turns (void)(x<0) into if(x<0)(void)0 which vector x doesn't like)
Comment 2 Hans-Peter Nilsson 2012-11-01 19:52:02 UTC
(In reply to comment #1)
> Since the error happens in expand, I assume this is a dup of PR 55001, for
> which I posted a patch earlier today.

It could be; that PR lacks a description of the effects, so my pre-report search did not find it.  (It only speaks of something missing in the code, could be just a missing optimization at a glance.)

I'll leave dealing with it to you.
Comment 3 Marc Glisse 2012-11-01 20:22:14 UTC
(In reply to comment #2)
> It could be; that PR lacks a description of the effects, so my pre-report
> search did not find it.  (It only speaks of something missing in the code,
> could be just a missing optimization at a glance.)

Yes, sorry, "dup" probably wasn't the right term, I meant it as: "I think I know what's going on".

Thanks again for filing the bug and CCing me.
Comment 4 Hans-Peter Nilsson 2012-11-02 05:34:06 UTC
I made this PR depend on PR55001, which has a committed patch that solves the regression in this PR.  So, looks like a dup, for some definition thereof.
Comment 5 Marc Glisse 2012-11-02 08:30:11 UTC
Thanks.
The failure also disappeared between:
http://gcc.gnu.org/ml/gcc-testresults/2012-11/msg00087.html
and:
http://gcc.gnu.org/ml/gcc-testresults/2012-11/msg00095.html

so let's mark this bug as fixed.

PR55001 remains open because the patch makes the compiler produce sub-optimal code (but correct at least).