public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/50303] New: Segfault with variadic template template parameters.
@ 2011-09-06 14:45 andyspiros at gmail dot com
  2011-09-14 21:04 ` [Bug c++/50303] [C++0x] " paolo.carlini at oracle dot com
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: andyspiros at gmail dot com @ 2011-09-06 14:45 UTC (permalink / raw)
  To: gcc-bugs

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

             Bug #: 50303
           Summary: Segfault with variadic template template parameters.
    Classification: Unclassified
           Product: gcc
           Version: 4.6.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: andyspiros@gmail.com


Created attachment 25203
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=25203
Preprocessed source

A function "f" taking a class and a set (variadic) of template classes as
template parameters is written. If this function passes the variadic parameter
to another one, the compiler fails with a segfault. Otherwise the compiler just
works.

This happens on Gentoo with gcc 4.6.1, on Fedora 15 with gcc-4.6.0, on the
online service ideone (see http://ideone.com/yrIfa -- there is the original
source too).

On Gentoo I have the following output:

$ g++ -v -save-temps -std=c++0x variadic_template.cpp -pedantic-errors

Using built-in specs.
Reading specs from /usr/lib/gcc/x86_64-pc-linux-gnu/4.6.1/asneeded.specs
COLLECT_GCC=/usr/x86_64-pc-linux-gnu/gcc-bin/4.6.1/g++
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-pc-linux-gnu/4.6.1/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with:
/var/tmp/portage/sys-devel/gcc-4.6.1-r1/work/gcc-4.6.1/configure --prefix=/usr
--bindir=/usr/x86_64-pc-linux-gnu/gcc-bin/4.6.1
--includedir=/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.1/include
--datadir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.6.1
--mandir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.6.1/man
--infodir=/usr/share/gcc-data/x86_64-pc-linux-gnu/4.6.1/info
--with-gxx-include-dir=/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.1/include/g++-v4
--host=x86_64-pc-linux-gnu --build=x86_64-pc-linux-gnu --disable-altivec
--disable-fixed-point --without-ppl --without-cloog --enable-lto --enable-nls
--without-included-gettext --with-system-zlib --disable-werror
--enable-secureplt --enable-multilib --enable-libmudflap --disable-libssp
--enable-libgomp
--with-python-dir=/share/gcc-data/x86_64-pc-linux-gnu/4.6.1/python
--enable-checking=release --enable-languages=c,c++,java,fortran --enable-shared
--enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu
--with-bugurl=http://bugs.gentoo.org/ --with-pkgversion='Gentoo 4.6.1-r1 p1.0,
pie-0.4.5'
Thread model: posix
gcc version 4.6.1 (Gentoo 4.6.1-r1 p1.0, pie-0.4.5) 
COLLECT_GCC_OPTIONS='-v' '-save-temps' '-std=c++0x' '-pedantic-errors'
'-shared-libgcc' '-mtune=generic' '-march=x86-64'
 /usr/libexec/gcc/x86_64-pc-linux-gnu/4.6.1/cc1plus -E -quiet -v -D_GNU_SOURCE
variadic_template.cpp -D_FORTIFY_SOURCE=2 -mtune=generic -march=x86-64
-std=c++0x -pedantic-errors -fpch-preprocess -o variadic_template.ii
ignoring nonexistent directory
"/usr/lib/gcc/x86_64-pc-linux-gnu/4.6.1/../../../../x86_64-pc-linux-gnu/include"
#include "..." search starts here:
#include <...> search starts here:
 /usr/lib/gcc/x86_64-pc-linux-gnu/4.6.1/include/g++-v4
 /usr/lib/gcc/x86_64-pc-linux-gnu/4.6.1/include/g++-v4/x86_64-pc-linux-gnu
 /usr/lib/gcc/x86_64-pc-linux-gnu/4.6.1/include/g++-v4/backward
 /usr/lib/gcc/x86_64-pc-linux-gnu/4.6.1/include
 /usr/local/include
 /usr/lib/gcc/x86_64-pc-linux-gnu/4.6.1/include-fixed
 /usr/include
End of search list.
COLLECT_GCC_OPTIONS='-v' '-save-temps' '-std=c++0x' '-pedantic-errors'
'-shared-libgcc' '-mtune=generic' '-march=x86-64'
 /usr/libexec/gcc/x86_64-pc-linux-gnu/4.6.1/cc1plus -fpreprocessed
variadic_template.ii -quiet -dumpbase variadic_template.cpp -mtune=generic
-march=x86-64 -auxbase variadic_template -pedantic-errors -std=c++0x -version
-o variadic_template.s
GNU C++ (Gentoo 4.6.1-r1 p1.0, pie-0.4.5) version 4.6.1 (x86_64-pc-linux-gnu)
    compiled by GNU C version 4.6.1, GMP version 5.0.2, MPFR version 3.0.1-p4,
MPC version 0.8.2
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
GNU C++ (Gentoo 4.6.1-r1 p1.0, pie-0.4.5) version 4.6.1 (x86_64-pc-linux-gnu)
    compiled by GNU C version 4.6.1, GMP version 5.0.2, MPFR version 3.0.1-p4,
MPC version 0.8.2
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: 510fa67dba4694d68782d987f500559c
variadic_template.cpp: In function ‘void f() [with Interface = I1, Actions =
A1, A2]’:
variadic_template.cpp:58:16:   instantiated from here
variadic_template.cpp:49:58: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://bugs.gentoo.org/> for instructions.


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2012-04-17 15:39 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-09-06 14:45 [Bug c++/50303] New: Segfault with variadic template template parameters andyspiros at gmail dot com
2011-09-14 21:04 ` [Bug c++/50303] [C++0x] " paolo.carlini at oracle dot com
2011-09-14 22:48 ` andyspiros at gmail dot com
2011-09-14 23:11 ` andyspiros at gmail dot com
2011-09-15  0:32 ` paolo.carlini at oracle dot com
2011-09-15  7:49 ` markus at trippelsdorf dot de
2012-04-16 15:33 ` jason at gcc dot gnu.org
2012-04-17  2:42 ` jason at gcc dot gnu.org
2012-04-17 14:19 ` jason at gcc dot gnu.org
2012-04-17 15:39 ` jason at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).