Bug 23045 - ICE in force_decl_die, at dwarf2out.c:12621
Summary: ICE in force_decl_die, at dwarf2out.c:12621
Status: RESOLVED DUPLICATE of bug 22034
Alias: None
Product: gcc
Classification: Unclassified
Component: c++ (show other bugs)
Version: 4.1.0
: P2 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-07-24 07:54 UTC by dank
Modified: 2005-08-07 06:19 UTC (History)
1 user (show)

See Also:
Host:
Target:
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 dank 2005-07-24 07:54:06 UTC
In testing gcc-4.1-20050716 for i686:

I originally ran into the following error

  internal compiler error: tree check: expected tree that contains 'decl
minimal' structure, have 'record_type'  in lookup_decl_die, at dwarf2out.c:5461

on the last line of a program.  While starting to come up with
a minimal test case, I was surprised to find that although
I could reproduce that error with preprocessed source,
stripping out the lines starting with # produced a different error:

x.ii: In instantiation of '__gnu_cxx::rope<char, std::allocator<char> >':
x.ii:42429:   instantiated from here
x.ii:41107: internal compiler error: in force_decl_die, at dwarf2out.c:12621

This is probably fortunate, since it now dies much sooner than at the
end of the program.  

To reproduce this, unpack http://kegel.com/gcc/ice-rope.ii.gz,
then compile it with

i686-unknown-linux-gnu-gcc -g -Wall -Werror -funsigned-char -c

Apologies for not finding a small testcase,
and for using a week-old snapshot for testing.
Hopefully this is useful anyway.
Comment 1 Andrew Pinski 2005-07-24 13:25:33 UTC
lookup_decl_die is most likely PR 22034.
force_decl_die is most likely PR 22514.
Comment 2 dank 2005-07-24 17:28:13 UTC
Yep.  

Compiling PR22034's testcase yields
pr22034.cc:6: internal compiler error: tree check: expected tree that contains
'decl minimal' structure, have 'record_type'  in lookup_decl_die, at
dwarf2out.c:5461

And compiling pr22514's testcase yields
pr22514.cc:11: error: expected unqualified-id before '}' token
pr22514.cc: In instantiation of 's::list<1>':
pr22514.cc:12:   instantiated from here
pr22514.cc:8: internal compiler error: in force_decl_die, at dwarf2out.c:12621

So this is a dup.  Sorry for the noise.
Comment 3 Andrew Pinski 2005-07-24 17:29:27 UTC

*** This bug has been marked as a duplicate of 22034 ***
Comment 4 dank 2005-08-07 06:19:22 UTC
And sure enough, gcc-4.1-20050806 fixes it.