This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/39070] Segmentation fault
- From: "kononov at ftml dot net" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 12 Feb 2009 23:49:11 -0000
- Subject: [Bug c++/39070] Segmentation fault
- References: <bug-39070-17259@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #3 from kononov at ftml dot net 2009-02-12 23:49 -------
$ cat t.cc
template<typename X> struct junk {
template<typename Z> static Z& y();
template<typename Y> static int test(...);
template<typename Y> static char test(typeof(y<Y>())*);
static int const value=sizeof(test<X>(0));
};
typedef char type[junk<int>::value==sizeof(char) ? 1 : -1];
g++ 4.3.2 is happy with the above code.
g++ 4.3.3 gives a segfault.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39070