http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52637

             Bug #: 52637
           Summary: ICE producing debug info for c++11 code using
                    templates/decltype/lambda
    Classification: Unclassified
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassig...@gcc.gnu.org
        ReportedBy: scov...@gmail.com


The following code snippet produces an ICE when compiled by gcc-4.7.0-RC1 with
flags `-std=gnu++11 -g -c' (gcc-4.6.2 and 4.5.3 accept it):

=== bug.cpp ===
template <typename T>
struct foo {
    foo(T &fn) { }
};

template <class T, typename V>
void bar(T*, V) {
    auto x = [&] { };
    auto y = foo<decltype(x)>(x);
}

template <typename T>
void bar(T* t) { bar(t, [&] { }); }

struct baz {
    void bar() { ::bar(this); }
};
===============

$ ~/apps/gcc-4.7-RC1/bin/g++ -std=gnu++11 -g bug.cpp
bug.cpp:17:2: internal compiler error: in output_die, at dwarf2out.c:8463
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.

The testcase was distilled from a multi-thousand line app with help from
multidelta.

My platform is i686-pc-cygwin, in case that matters.

Reply via email to