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++/54264] New: internal compiler error on sample program from the C++ standard


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.


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