This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/31260] [4.1/4.2/4.3 Regression] ICE: segmentation fault with template code
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 19 Mar 2007 09:26:55 -0000
- Subject: [Bug c++/31260] [4.1/4.2/4.3 Regression] ICE: segmentation fault with template code
- References: <bug-31260-8535@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #1 from pinskia at gcc dot gnu dot org 2007-03-19 09:26 -------
It seems like this can be made into valid code and still ICE.
The valid code is:
template<class T1> struct S1 {
template<bool T2> struct S2;
template<template<bool> class T3> struct S3 {
template<typename T4=S3<S2> > struct S4 {};
struct S5 : S4<> {
};
};
};
-----
Note if I change how S5 is declared using a specific template argument instead
of <>, the crash goes away in that the follow compiles just fine:
template<class T1> struct S1 {
template<bool T2> struct S2;
template<template<bool> class T3> struct S3 {
template<typename T4=S3<S2> > struct S4 {};
struct S5 : S4<S3<S2> > {
};
};
};
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Keywords| |ice-on-invalid-code, ice-on-
| |valid-code
Last reconfirmed|0000-00-00 00:00:00 |2007-03-19 09:26:55
date| |
Summary|ICE: segmentation fault on |[4.1/4.2/4.3 Regression]
|invalid code |ICE: segmentation fault with
| |template code
Target Milestone|--- |4.1.3
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31260