c++/10722: [3.3 regression] ICE (segfault) when specializing with an invalid type

Giovanni Bajo giovannibajo@libero.it
Thu May 15 00:00:00 GMT 2003


http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=10722

Let's split this PR. I will shortly open a new PR to track the 3.4 issue, we
keep this one only for the 3.3 reduced snippet. In other words, the bug we
track here is:

---------------------------------------------
template <class  P, class Q>
struct pair {};

template <typename T>
struct pair<T, INVALID> {
    typedef T first_type;
};

---------------------------------------------
pr10722.cpp:5: error: type/value mismatch at argument 2 in template
parameter list for `template<class P, class Q> struct pair'
pr10722.cpp:5: error:   expected a type, got `INVALID'
pr10722.cpp:6: internal compiler error: Segmentation fault
Please submit a full bug report,

This is an ice-on-illegal, 3.3 regression with respect to 2.95 where the
code was not ICE-ing the compiler.

Giovanni Bajo



More information about the Gcc-bugs mailing list