[Bug c++/48115] [4.6/4.7 Regression] internal compiler error: in type_has_nontrivial_copy_init, at cp/tree.c:2482
redi at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Mon Mar 14 16:52:00 GMT 2011
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48115
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|[4.6/4.7 Regression] |[4.6/4.7 Regression]
|[C++0x] internal compiler |internal compiler error: in
|error: in |type_has_nontrivial_copy_in
|type_has_nontrivial_copy_in |it, at cp/tree.c:2482
|it, at cp/tree.c:2482 |
--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> 2011-03-14 16:52:30 UTC ---
Here's a C++03 version which works with 4.5, clang and EDG, but ICEs with 4.6
template<typename> struct templ { };
template<typename T> T declval();
typedef int (*F2)(...);
template<int> struct Int { };
template<typename F, typename T>
struct S
{
template<typename A>
Int<sizeof( declval<F>()(T()) )>
f(A);
};
int main()
{
S<F2, templ<int> >().f(0);
}
More information about the Gcc-bugs
mailing list