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

            Bug ID: 60709
           Summary: [C++11]ICE when using a braced-init-list as function
                    argument to initialize a reference to array
           Product: gcc
           Version: 4.8.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: frankhb1989 at gmail dot com

Minimal case:

template<class T>
struct X{};

void f(X<int>(&&)[1])
{}
int main()
{
  f({X<int>()});
}

g++ a.cc -std=c++11
a.cc: In function 'int main()':
a.cc:8:15: internal compiler error: Segmentation fault
   f({X<int>()});
               ^
libbacktrace could not find executable to open
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://sourceforge.net/projects/mingw-w64> for instructions.

Clang++ 3.4 accepted it successfully.

Reply via email to