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 libstdc++/38684] New: [c++0x] ICE using initializer_list ctor in derived class


#include <initializer_list>

struct Y {};

template<class T> struct X : Y { 
  X(std::initializer_list<T>) {}
}; 

struct A { 
  X<int> v;
};

int main() {
  A a{ {1,2,3} };
}

Compiling with -std=c++0x gives:
internal compiler error: in process_init_constructor_record, at
cp/typeck2.c:987

This compiles w/o ice or error if X does not derive from Y.


-- 
           Summary: [c++0x] ICE using initializer_list ctor in derived class
           Product: gcc
           Version: 4.4.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P3
         Component: libstdc++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: cfairles at gcc dot gnu dot org
 GCC build triplet: x86_64-redhat-linux
  GCC host triplet: x86_64-redhat-linux
GCC target triplet: x86_64-redhat-linux


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


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