[Bug c++/54264] New: internal compiler error on sample program from the C++ standard
meng at g dot clemson.edu
gcc-bugzilla@gcc.gnu.org
Tue Aug 14 21:37:00 GMT 2012
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54264
Bug #: 54264
Summary: internal compiler error on sample program from the C++
standard
Classification: Unclassified
Product: gcc
Version: 4.7.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: meng@g.clemson.edu
g++-4.7.0 gave me "Internal compiler error" for the program below, which is
slightly adapted from the C++11 standard 7.1.6.2/5 sample program.
template <typename> struct A { ~A () = delete; };
template <typename T> auto h () -> A<T>;
template <typename T> auto i (T) -> T;
template <typename T> auto f (T) -> decltype(i(h<T>()));
int main ()
{
f(0);
return 0;
}
The standard requires an error for the declaration of f because A::~A is
implicitly used and it is deleted. g++-4.7.0 captures the error but then
stopped working.
More information about the Gcc-bugs
mailing list