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 c++/71548] New: Invalid declaration involving template template param causes crash


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

            Bug ID: 71548
           Summary: Invalid declaration involving template template param
                    causes crash
           Product: gcc
           Version: 6.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: dude4891 at xemaps dot com
  Target Milestone: ---

Created attachment 38706
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=38706&action=edit
input that crashes compiler

Here is a 9-line file (no includes) which causes various versions of g++ to
crash. I tested versions 4.7.3, 5.2.0, and 6.1.0; the bug was present in all.

Command line: 'g++ -std=c++11 bugmin.cpp'.


The output with -v for a run with version 6.1 is:

Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/usr/local/libexec/gcc/x86_64-pc-linux-gnu/6.1.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: ./configure --prefix=/usr/local --disable-multilib
--without-mpc --without-mpfr --without-gmp --without-cloog --without-isl
--enable-languages=c,c++
Thread model: posix
gcc version 6.1.0 (GCC) 
COLLECT_GCC_OPTIONS='-v' '-std=c++11' '-shared-libgcc' '-mtune=generic'
'-march=x86-64'
 /usr/local/libexec/gcc/x86_64-pc-linux-gnu/6.1.0/cc1plus -quiet -v -imultiarch
x86_64-linux-gnu -D_GNU_SOURCE main.cpp -quiet -dumpbase main.cpp
-mtune=generic -march=x86-64 -auxbase main -std=c++11 -version -o
/tmp/ccLwXocj.s
GNU C++11 (GCC) version 6.1.0 (x86_64-pc-linux-gnu)
        compiled by GNU C version 6.1.0, GMP version 5.0.2, MPFR version
3.1.0-p3, MPC version 0.9, isl version none
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
ignoring nonexistent directory "/usr/local/include/x86_64-linux-gnu"
ignoring nonexistent directory
"/usr/local/lib/gcc/x86_64-pc-linux-gnu/6.1.0/../../../../x86_64-pc-linux-gnu/include"
#include "..." search starts here:
#include <...> search starts here:
 /usr/local/lib/gcc/x86_64-pc-linux-gnu/6.1.0/../../../../include/c++/6.1.0

/usr/local/lib/gcc/x86_64-pc-linux-gnu/6.1.0/../../../../include/c++/6.1.0/x86_64-pc-linux-gnu

/usr/local/lib/gcc/x86_64-pc-linux-gnu/6.1.0/../../../../include/c++/6.1.0/backward
 /usr/local/lib/gcc/x86_64-pc-linux-gnu/6.1.0/include
 /usr/local/include
 /usr/local/lib/gcc/x86_64-pc-linux-gnu/6.1.0/include-fixed
 /usr/include/x86_64-linux-gnu
 /usr/include
End of search list.
GNU C++11 (GCC) version 6.1.0 (x86_64-pc-linux-gnu)
        compiled by GNU C version 6.1.0, GMP version 5.0.2, MPFR version
3.1.0-p3, MPC version 0.9, isl version none
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
Compiler executable checksum: e6557bfcf1105af72e8a2699b63dcd66
main.cpp: In substitution of 'template<class ... T> void f(S<T ...>) [with T =
<missing>]':
main.cpp:11:8:   required from here
main.cpp:11:8: internal compiler error: Segmentation fault
     f(s);
        ^
libbacktrace could not find executable to open
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.

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