Bug 22444 - [4.1 regression] ICE at tree-into-ssa.c:466
Summary: [4.1 regression] ICE at tree-into-ssa.c:466
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: tree-optimization (show other bugs)
Version: 4.1.0
: P2 normal
Target Milestone: 4.1.0
Assignee: Not yet assigned to anyone
URL:
Keywords: ice-on-valid-code
: 22416 22598 23310 (view as bug list)
Depends on: 22598
Blocks: 22416 22483
  Show dependency treegraph
 
Reported: 2005-07-12 16:04 UTC by Hans-Peter Nilsson
Modified: 2005-10-17 04:16 UTC (History)
5 users (show)

See Also:
Host:
Target:
Build:
Known to work: 4.0.1
Known to fail:
Last reconfirmed: 2005-10-12 17:45:24


Attachments
Preprocessed source (2.29 KB, text/plain)
2005-07-12 16:05 UTC, Hans-Peter Nilsson
Details
Preprocessed source for mmix-knuth-mmixware for reopened PR. (2.60 KB, text/plain)
2005-07-30 08:22 UTC, Hans-Peter Nilsson
Details
reduced testcase from PR23310 (4.86 KB, text/plain)
2005-08-10 14:42 UTC, Richard Biener
Details
more minimized 23310 testcase (3.08 KB, text/plain)
2005-08-10 15:57 UTC, Richard Biener
Details
even more minimized 23310 testcase (1.27 KB, text/plain)
2005-08-11 15:21 UTC, Andrew Pinski
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Hans-Peter Nilsson 2005-07-12 16:04:07 UTC
Last known to work with: "Sat Jul  9 22:01:35 UTC 2005".
Known to fail with: "Sun Jul 10 06:32:56 UTC 2005".
With LAST_UPDATED: "Tue Jul 12 03:25:01 UTC 2005" I still get:
Running
/home/hp/combined/combined/libstdc++-v3/testsuite/libstdc++-dg/normal.exp ...
FAIL: 23_containers/set/explicit_instantiation/3.cc (test for excess errors)

With the message in the .log being (c-n-p):
/home/hp/combined/crislinux-sim/cris-axis-linux-gnu/libstdc++-v3/include/bits/stl_set.h:
In member function 'std::pair<typename s\
td::_Rb_tree<_Key, _Key, std::_Identity<_Key>, _Compare, typename
_Alloc::rebind<_Key>::other>::const_iterator, bool> std::set<_K\
ey, _Compare, _Alloc>::insert(const _Key&) [with _Key =
__gnu_test::NonDefaultConstructible, _Compare = std::less<__gnu_test::Non\
DefaultConstructible>, _Alloc =
std::allocator<__gnu_test::NonDefaultConstructible>]':^M
/home/hp/combined/crislinux-sim/cris-axis-linux-gnu/libstdc++-v3/include/bits/stl_set.h:318:
internal compiler error: tree check:\
 expected ssa_name, have var_decl in is_old_name, at tree-into-ssa.c:466^M

Will attach preprocessed source.
Comment 1 Hans-Peter Nilsson 2005-07-12 16:05:54 UTC
Created attachment 9248 [details]
Preprocessed source

cc1plus -fpreprocessed 2.ii -march=v10 -quiet -dumpbase 2.cc -auxbase-strip 2.s
-g -O2 -version -ffunction-sections -fdata-sections -fmessage-length=0 -o 2.s
Comment 2 Andrew Pinski 2005-07-12 16:07:40 UTC
This looks very much related to PR 22416.
Comment 3 Hans-Peter Nilsson 2005-07-12 16:29:42 UTC
Between LAST_UPDATED "Mon Jul 11 09:23:25 UTC 2005"
and "Mon Jul 11 18:07:42 UTC 2005", I started getting an additional similar
failure for cris-axis-linux-gnu:
...
FAIL: 23_containers/set/explicit_instantiation/3.cc (test for excess errors)
Same ICE.

In addition, the 3.cc test now fails on mmix-knuth-mmixware as well.
Even more, both 2.cc and 3.cc now fail on cris-axis-elf as well.
(No preprocessed source for any of these.)
Comment 4 Joseph S. Myers 2005-07-17 21:13:12 UTC
These failures have appeared for me on i686-pc-linux-gnu on 20050717.
Comment 5 Andrew Pinski 2005-07-17 21:20:36 UTC
the patch in PR 22483 should fix this.
Comment 6 Andrew Pinski 2005-07-19 04:17:27 UTC
Fixed.
Comment 7 Hans-Peter Nilsson 2005-07-30 08:17:49 UTC
I'm reopening this PR as the failure with mmix-knuth-mmixware and
LAST_UPDATED "Fri Jul 29 18:30:36 UTC 2005" is identical to the
original description.
Comment 8 Hans-Peter Nilsson 2005-07-30 08:22:16 UTC
Created attachment 9387 [details]
Preprocessed source for mmix-knuth-mmixware for reopened PR.

/home/hp/combined/mmix-regobj/./gcc/cc1plus -fpreprocessed 2.ii -quiet
-dumpbase 2.cc -auxbase-strip 2.s -g -O2 -version -fmessage-length=0 -o 2.s
Comment 9 Hans-Peter Nilsson 2005-08-01 21:43:49 UTC
For the record, cross to cris-axis-linux-gnu started failing with the same log
message for 1.cc and 3.cc with "Sun Jul 31 22:56:52 UTC 2005",
last known passed with "Sat Jul 30 14:53:00 UTC 2005".
Comment 10 Andrew Pinski 2005-08-08 15:07:54 UTC
*** Bug 22416 has been marked as a duplicate of this bug. ***
Comment 11 Andrew Pinski 2005-08-08 15:09:30 UTC
*** Bug 22598 has been marked as a duplicate of this bug. ***
Comment 12 Andrew Pinski 2005-08-10 10:30:19 UTC
*** Bug 23310 has been marked as a duplicate of this bug. ***
Comment 13 Richard Biener 2005-08-10 12:58:41 UTC
I'm reducing the testcase from 23310 at the moment.  Trying to produce both
an ice-on-valid and a (smaller) ice-on-invalid (or ice-on-ice, whatever will
come out of it ;)).
Comment 14 Richard Biener 2005-08-10 14:42:40 UTC
Created attachment 9462 [details]
reduced testcase from PR23310

PR23310 reduced, ice-on-valid with -O2, not with -O2 -fdump-tree-alias1
Comment 15 Richard Biener 2005-08-10 15:57:26 UTC
Created attachment 9464 [details]
more minimized 23310 testcase

Even more reduced.  Now one has to manually propagate types to reduce it maybe
even more.  Remember to check successful compile with -O2 -fdump-tree-alias1
and
ICE with -O2.
Comment 16 Richard Biener 2005-08-10 16:25:37 UTC
Backtrace of the ICE

#0  internal_error (gmsgid=0x882bbf8 "tree check: %s, have %s in %s, at %s:%d")
    at diagnostic.c:534
#1  0x085f4b11 in tree_check_failed (node=0x402892c0,
    file=0x87b4728 "../../../src/gcc-unpatched/gcc/tree-into-ssa.c", line=466,
    function=0x87b4fcd "is_old_name") at tree.c:5854
#2  0x0825a791 in is_old_name (name=0x402892c0) at tree-into-ssa.c:466
#3  0x0825aba0 in maybe_replace_use (use_p=0x4031c234) at tree-into-ssa.c:1383
#4  0x082560a2 in rewrite_update_stmt (walk_data=0xbfffeb70, bb=0x40285730, si=
      {tsi = {ptr = 0x4023c6c0, container = 0x4027cf00}, bb = 0x40285730})
    at tree-into-ssa.c:1471
#5  0x08288101 in walk_dominator_tree (walk_data=0xbfffeb70, bb=0x40285730)
    at domwalk.c:196
#6  0x0828817c in walk_dominator_tree (walk_data=0xbfffeb70, bb=0x40285690)
    at domwalk.c:212
#7  0x0825650c in rewrite_blocks (entry=0x40285690, what=REWRITE_UPDATE,
    blocks=0x88f4750) at tree-into-ssa.c:1617
#8  0x08258bbd in update_ssa (update_flags=128) at tree-into-ssa.c:2799
#9  0x0861bb82 in execute_todo (pass=0x8851660, flags=151, use_required=0 '\0')
    at passes.c:701

(gdb) print *pass
$1 = {name = 0x87b655c "alias", gate = 0,
  execute = 0x8270142 <compute_may_aliases>, sub = 0x0, next = 0x8854100,
  static_pass_number = 22, tv_id = 33, properties_required = 92,
  properties_provided = 604, properties_destroyed = 0, todo_flags_start = 0,
  todo_flags_finish = 151, letter = 0 '\0'}

the ICE vanishes if -fdump-tree-original, i.e. dumping before the ICE, and
even if dumping after the ICE with f.i. -fdump-tree-vars.  GCAC checking
doesn't complain about anything, so does valgrind.
Comment 17 Andrew Pinski 2005-08-11 15:21:44 UTC
Created attachment 9472 [details]
even more minimized 23310 testcase
Comment 18 Mark Mitchell 2005-08-22 03:46:26 UTC
MMIX is not a primary of secondary platform; removing target milestone.
Comment 19 Andrew Pinski 2005-08-22 03:50:19 UTC
This shows up on more than mmix, I should have marked this as such.
Comment 20 Benjamin Kosnik 2005-08-24 15:59:51 UTC
This has been failing on x86/linux for the last two months. Any ETA on a fix? If
not, is there a patch that can get reverted to fix this?

-benjamin
Comment 21 Andrew Pinski 2005-08-24 16:38:35 UTC
(In reply to comment #20)
> This has been failing on x86/linux for the last two months. Any ETA on a fix?
The issue is that this is very dependent on what is built.

> If not, is there a patch that can get reverted to fix this?

I almost think this is a C++ front-end bug with some GC bug but I cannot prove it.

In some cases 1.cc also fails too with the same ICE.
Comment 22 Richard Biener 2005-08-25 12:27:45 UTC
Note that the reduced testcase from pinskia no longer "works" if supplying
-fdump-treee-alias1.
Comment 23 Richard Biener 2005-08-25 13:47:33 UTC
Note also that removing any of the (unused) typedef's is causing the failure to
go away, so it looks like something may be overflowing, like a hashtable or an
array.  The symptom is a variable not marked for renaming during/after alias1 pass.

The key seem to be UIDs -- deleting code from the testcase and sticking in enough
typedef int FooXX at the right places makes the ICE stay.

Very weird stuff.
Comment 24 Benjamin Kosnik 2005-09-09 09:52:16 UTC
I think this is memory-related as well. On 2gig RAM, this fails reliably. On
512Mb, no fail.
Comment 25 Chris Jefferson 2005-09-15 13:32:09 UTC
I get the same bug on darwin8.2.0, with 768MB of ram
Comment 26 Eric Botcazou 2005-10-05 11:41:39 UTC
Present on my SPARC/Solaris 8 machine, but neither on the SPARC/Solaris 9 nor on the SPARC/Solaris 10 machines, while the 3 compilers are essentially identical.
Comment 27 Hans-Peter Nilsson 2005-10-12 17:45:24 UTC
For cris-axis-elf, 1.cc and 2.cc fail with the same error
at LAST_UPDATED "Tue Oct 11 22:12:26 UTC 2005".
Comment 28 GCC Commits 2005-10-17 02:28:49 UTC
Subject: Bug 22444

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	dberlin@gcc.gnu.org	2005-10-17 02:28:44

Modified files:
	gcc            : ChangeLog tree-ssa-alias.c 
Added files:
	gcc/testsuite/g++.dg/tree-ssa: pr22444.C 

Log message:
	2005-10-16  Daniel Berlin  <dberlin@dberlin.org>
	
	Fix PR tree-optimization/22444
	* tree-ssa-alias.c (compute_flow_insensitive_aliasing):
	Assert that we don't hit something with subvars.
	(setup_pointers_and_addressables): Don't add things with subvars,
	because we'll already process the subvars for aliasing purposes.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.10167&r2=2.10168
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/tree-ssa-alias.c.diff?cvsroot=gcc&r1=2.111&r2=2.112
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/tree-ssa/pr22444.C.diff?cvsroot=gcc&r1=NONE&r2=1.1

Comment 29 Daniel Berlin 2005-10-17 02:29:23 UTC
Should be fixed now