This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/20789] [3.4/4.0/4.1 regression] ICE with incomplete type in template

------- Additional Comments From reichelt at gcc dot gnu dot org  2005-04-11 20:14 -------
Confirmed, happens since gcc 3.4.0.

Reduced testcase:

template<typename> struct A;

template<int> struct B {};

template<typename T> struct C
    static const int i = A<T>::i;
    static const int j = i;
    B<j> b;

C<int> c;

Error message: In instantiation of 'C<int>':   instantiated from here error: incomplete type 'A<int>' used in nested name specifier
g++: Internal error: Segmentation fault (program cc1plus)
Please submit a full bug report. [etc.]

           What    |Removed                     |Added
                 CC|                            |reichelt at gcc dot gnu dot
                   |                            |org
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
           Keywords|                            |error-recovery, ice-on-
                   |                            |invalid-code, monitored
   Last reconfirmed|0000-00-00 00:00:00         |2005-04-11 20:14:27
               date|                            |
            Summary|segv                        |[3.4/4.0/4.1 regression] ICE
                   |                            |with incomplete type in
                   |                            |template
   Target Milestone|---                         |3.4.4

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]