20789 – [4.0 regression] ICE with incomplete type in template (original) (raw)
Comment 4 Volker Reichelt 2005-04-11 20:14:27 UTC
Confirmed, happens since gcc 3.4.0.
Reduced testcase:
====================================== template struct A;
template struct B {};
template struct C { static const int i = A::i; static const int j = i; B b; };
C c;
Error message:
PR20789.cc: In instantiation of 'C': PR20789.cc:12: instantiated from here PR20789.cc:7: error: incomplete type 'A' used in nested name specifier g++: Internal error: Segmentation fault (program cc1plus) Please submit a full bug report. [etc.]
Comment 6 Volker Reichelt 2005-05-24 14:20:34 UTC
*** Bug 21670 has been marked as a duplicate of this bug. ***
Comment 8 Nathan Sidwell 2005-06-13 16:36:39 UTC
fixed mainline and 3.4 2005-06-13 Nathan Sidwell <nathan@codesourcery.com>
[PR c++/20789](show%5Fbug.cgi?id=20789 "RESOLVED FIXED - [4.0 regression] ICE with incomplete type in template")
* decl.c (cp_finish_decl): Clear runtime runtime initialization if
in-class decl's initializer is bad.Comment 10 Volker Reichelt 2005-06-14 08:24:32 UTC
*** Bug 20668 has been marked as a duplicate of this bug. ***
Comment 11 Drea Pinski 2005-06-21 16:56:18 UTC
*** Bug 22137 has been marked as a duplicate of this bug. ***
Comment 12 Drea Pinski 2005-06-25 02:07:57 UTC
*** Bug 22181 has been marked as a duplicate of this bug. ***
Comment 13 Volker Reichelt 2005-07-12 10:48:34 UTC
Nathan, would you mind applying the patch to the 4.0 branch, since the branch is now open again? Thanks!
Comment 14 Nathan Sidwell 2005-07-12 11:07:50 UTC
Subject: Re: [4.0 regression] ICE with incomplete type in template
reichelt at gcc dot gnu dot org wrote:
------- Additional Comments From reichelt at gcc dot gnu dot org 2005-07-12 10:48 ------- Nathan, would you mind applying the patch to the 4.0 branch, since the branch is now open again? Thanks!
yes, I'm testing my jumbo set of patches there as I write :)
nathan
Comment 16 Nathan Sidwell 2005-07-12 11:29:18 UTC
fixed on 4.0 branch