This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/54264] New: internal compiler error on sample program from the C++ standard
- From: "meng at g dot clemson.edu" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 14 Aug 2012 21:37:22 +0000
- Subject: [Bug c++/54264] New: internal compiler error on sample program from the C++ standard
- Auto-submitted: auto-generated
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.