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

             Bug #: 50084
           Summary: ICE: C++0x, decltype + remove_reference + new
    Classification: Unclassified
           Product: gcc
           Version: 4.6.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassig...@gcc.gnu.org
        ReportedBy: gcc-...@safetymail.info


ICE while compiling the code below.

Version:
$ g++ -v
Using built-in specs.
COLLECT_GCC=/*/bin/g++
COLLECT_LTO_WRAPPER=/*/libexec/gcc/x86_64-unknown-linux-gnu/4.6.1/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: ./configure --prefix=/*
Thread model: posix
gcc version 4.6.1 (GCC) 


Command line: g++ -std=c++0x -c ice.ii

ice.ii:
//////////////////      8<          //////////////////////////
template<typename>   struct remove_reference;
template<typename T> struct remove_reference<T&> { typedef T type; };

template<typename T> struct A { A(){} };

void f()
{
        struct {
                A<int> a_;
        } * v = 0;

        typedef remove_reference<decltype(*v)>::type at;
        new at();
}
//////////////////      8<        /////////////////////////

Reply via email to