public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "andyspiros at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/50303] New: Segfault with variadic template template parameters.
Date: Tue, 06 Sep 2011 14:45:00 -0000	[thread overview]
Message-ID: <bug-50303-4@http.gcc.gnu.org/bugzilla/> (raw)

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.


             reply	other threads:[~2011-09-06 14:45 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-06 14:45 andyspiros at gmail dot com [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-50303-4@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).