https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83138

            Bug ID: 83138
           Summary: ICE: Segfault expanding function parameter pack in
                    subsequent sibling pack declaration
           Product: gcc
           Version: 8.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: hstong at ca dot ibm.com
  Target Milestone: ---

Given the self-contained source below, GCC ICEs with a segmentation fault.
This used to work with GCC 4.7.4.

### SOURCE (<stdin>):
template <typename ...T> void f(T ...args, char ...args2[][sizeof args]) { }
template <typename T> void g(T) { }
void h() { g(&f<int>); }


### ACTUAL OUTPUT:
g++: internal compiler error: Segmentation fault signal terminated program
cc1plus
Please submit a full bug report,
with preprocessed source if appropriate.
See <https://gcc.gnu.org/bugs/> for instructions.


### EXPECTED OUTPUT:
Clean compile.


### COMPILER INVOCATION COMMAND:
g++ -fsyntax-only -x c++ -std=c++11 -


### COMPILER VERSION INFO (g++ -v):
Using built-in specs.
COLLECT_GCC=/opt/wandbox/gcc-head/bin/g++
COLLECT_LTO_WRAPPER=/opt/wandbox/gcc-head/libexec/gcc/x86_64-pc-linux-gnu/8.0.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: ../source/configure --prefix=/opt/wandbox/gcc-head
--enable-languages=c,c++ --disable-multilib --without-ppl --without-cloog-ppl
--enable-checking=release --disable-nls --enable-lto
LDFLAGS=-Wl,-rpath,/opt/wandbox/gcc-head/lib,-rpath,/opt/wandbox/gcc-head/lib64,-rpath,/opt/wandbox/gcc-head/lib32
Thread model: posix
gcc version 8.0.0 20171122 (experimental) (GCC)

Reply via email to