Bug 22416 - [4.1 Regression] 23_containers/set/explicit_instantiation/1.cc fails: expected ssa_name, have var_decl in is_old_name, at tree-into-ssa.c:466
[4.1 Regression] 23_containers/set/explicit_instantiation/1.cc fails: expecte...
Status: RESOLVED DUPLICATE of bug 22444
Product: gcc
Classification: Unclassified
Component: tree-optimization
4.1.0
: P2 critical
: 4.1.0
Assigned To: Diego Novillo
: alias, ice-on-valid-code
Depends on: 22444
Blocks: 22483
  Show dependency treegraph
 
Reported: 2005-07-11 20:02 UTC by Joseph S. Myers
Modified: 2005-08-08 15:07 UTC (History)
4 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2005-07-12 16:25:52


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Joseph S. Myers 2005-07-11 20:02:41 UTC
FAIL: 23_containers/set/explicit_instantiation/1.cc (test for excess errors)

has appeared on mainline on i686-pc-linux-gnu (gcc-testresults shows other
platforms as well) between 20050710 and 20050711 (both at 07:00 UTC).

/scratch/gcc/nightly-2005-07-11-mainline/i686-pc-linux-gnu/build_gcc/build/gcc-mainline-nightly-i686-pc-linux-gnu-i686-pc-linux-gnu/i686-pc-linux-gnu/libstdc++-v3/include/bits/stl_set.h:
In member function 'std::pair<typename std::_Rb_tree<_Key, _Key,
std::_Identity<_Key>, _Compare, typename
_Alloc::rebind<_Key>::other>::const_iterator, bool> std::set<_Key, _Compare,
_Alloc>::insert(const _Key&) [with _Key = int, _Compare = std::less<int>, _Alloc
= std::allocator<int>]':
/scratch/gcc/nightly-2005-07-11-mainline/i686-pc-linux-gnu/build_gcc/build/gcc-mainline-nightly-i686-pc-linux-gnu-i686-pc-linux-gnu/i686-pc-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
Comment 1 Volker Reichelt 2005-07-12 10:43:55 UTC
I tried to reduce the testcase, but the problem just disappears on
unrelated changes of the code.

A run through valgrind resulted in the following output:

  130 % valgrind --tool=memcheck cc1plus -quiet -mtune=i686 -O3 1.ii
  ==17826== Memcheck, a memory error detector for x86-linux.
  ==17826== Copyright (C) 2002-2004, and GNU GPL'd, by Julian Seward et al.
  ==17826== Using valgrind-2.2.0, a program supervision framework for x86-linux.
  ==17826== Copyright (C) 2000-2004, and GNU GPL'd, by Julian Seward et al.
  ==17826== For more details, rerun with: -v
  ==17826== 
  ==17826== Conditional jump or move depends on uninitialised value(s)
  ==17826==    at 0x84E628F: find_what_p_points_to (tree-ssa-structalias.c:3184)
 
/Work/reichelt/GCC/FARM/gcc-4.1-20050712/bin/../lib/gcc/i686-pc-linux-gnu/4.1.0/
  ../../../../include/c++/4.1.0/bits/stl_set.h: In member function
'std::pair<type
  name std::_Rb_tree<_Key, _Key, std::_Identity<_Key>, _Compare, typename
_Alloc::
  rebind<_Key>::other>::const_iterator, bool> std::set<_Key, _Compare,
_Alloc>::in
  sert(const _Key&) [with _Key = int, _Compare = std::less<int>, _Alloc =
std::all
  ocator<int>]':
 
/Work/reichelt/GCC/FARM/gcc-4.1-20050712/bin/../lib/gcc/i686-pc-linux-gnu/4.1.0/
  ../../../../include/c++/4.1.0/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
  Please submit a full bug report,
  with preprocessed source if appropriate.
  See <URL:http://gcc.gnu.org/bugs.html> for instructions.
  ==17826== 
  ==17826== ERROR SUMMARY: 9 errors from 1 contexts (suppressed: 11 from 1)
  ==17826== malloc/free: in use at exit: 863685 bytes in 3373 blocks.
  ==17826== malloc/free: 195693 allocs, 192320 frees, 50172271 bytes allocated.
  ==17826== For a detailed leak analysis,  rerun with: --leak-check=yes
  ==17826== For counts of detected errors, rerun with: -v


The uninitialised value is reported long before the ICE happens, but
maybe it's the culprit anyway. An uninitialized value would also explain
why unrelated changes make the code compile again.
Comment 2 Joseph S. Myers 2005-07-12 20:11:47 UTC
The failure disappeared again for me on 20050712, but given comments about
uninitialized memory I doubt this indicates a fix.
Comment 3 Haren Visavadia 2005-07-18 10:14:27 UTC
I see this with GCC 4.1.0 20050716 snapshot on i686-pc-linux-gnu
Comment 4 Haren Visavadia 2005-07-18 11:09:34 UTC
After analysising libstdc++.log

For me, the testsuite failure is caused by:

FAIL: 23_containers/set/explicit_instantiation/1.cc (test for excess errors)
Excess errors:
/home/haren/alpha-toolchain/gcc-4.1-20050716/obj/i686-pc-linux-gnu/libstdc++-v3/include/bits/stl_set.h:
In member function 'std::pair<typename std::_Rb_tree<_Key, _Key,
std::_Identity<_Key>, _Compare, typename
_Alloc::rebind<_Key>::other>::const_iterator, bool> std::set<_Key, _Compare,
_Alloc>::insert(const _Key&) [with _Key = int, _Compare = std::less<int>, _Alloc
= std::allocator<int>]':
/home/haren/alpha-toolchain/gcc-4.1-20050716/obj/i686-pc-linux-gnu/libstdc++-v3/include/bits/stl_set.h:318:
internal compiler error: Segmentation fault

Comment 5 Andrew Pinski 2005-07-19 04:17:16 UTC
Fixed.
Comment 6 Volker Reichelt 2005-08-08 15:05:38 UTC
I still get these failures on i686-pc-linux-gnu:

FAIL: 23_containers/set/explicit_instantiation/1.cc (test for excess errors)
FAIL: 23_containers/set/explicit_instantiation/1.cc (test for excess errors)

Compiler version: 4.1.0 20050807 (experimental) 
Comment 7 Andrew Pinski 2005-08-08 15:07:50 UTC

*** This bug has been marked as a duplicate of 22444 ***