This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/36797] New: ICE on SFINAE and __is_empty
- From: "sebor at roguewave dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 10 Jul 2008 21:26:19 -0000
- Subject: [Bug c++/36797] New: ICE on SFINAE and __is_empty
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
gcc 4.3.0 crashes compiling the program below:
$ cat z.C && g++ z.C
template <int> struct A { };
template <class, bool> struct B;
template <class T> struct B<T, true> { typedef T X; };
template <class T>
int foo (typename B<T, __is_empty (T)>::X* = 0) { return 0; }
template <class T>
int foo (typename B<T, !__is_empty (T)>::X* = 0) { return 1; }
int main ()
{
foo<A<0> >();
}
z.C: In function ?int foo(typename B<T, __is_empty(T)>::X*) [with T = A<0>]?:
z.C:6: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
--
Summary: ICE on SFINAE and __is_empty
Product: gcc
Version: 4.3.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: sebor at roguewave dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36797