This is the mail archive of the gcc-bugs@gcc.gnu.org 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++/36797] New: ICE on SFINAE and __is_empty


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


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