From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30609 invoked by alias); 16 Jul 2010 23:48:39 -0000 Received: (qmail 30577 invoked by uid 48); 16 Jul 2010 23:48:27 -0000 Date: Fri, 16 Jul 2010 23:48:00 -0000 Subject: [Bug c++/44967] New: [C++0x] decltype of method call dependand on pack expansion crashes X-Bugzilla-Reason: CC Message-ID: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "piotr dot rak at gmail dot com" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2010-07/txt/msg01746.txt.bz2 cat has_construct.cc && g++-trunk -v -std=c++0x has_construct.cc #include template struct has_construct { typedef char one; typedef struct {char _m[2]; } two; template static decltype(std::declval().construct(std::declval(), std::declval()...), one()) test(int); template static two test(...); static const bool value = sizeof(test(0)) == 1; }; class A0 {}; class A1 { void construct(int*, int); }; template struct A2 { template void construct(_Tp1*, _Args&&...) {} }; void foo() { static bool a0 = has_construct::value; // ok static bool a1 = has_construct::value; // bang static bool a2 = has_construct, int>::value; // bang } Using built-in specs. COLLECT_GCC=/home/prak/Dev/gcc-install/bin/g++-trunk COLLECT_LTO_WRAPPER=/home/prak/Dev/gcc-install/libexec/gcc/i686-pc-linux-gnu/4.6.0/lto-wrapper Target: i686-pc-linux-gnu Configured with: ../gcc.git/configure --enable-languages=c,c++ --program-suffix=-trunk --prefix=/home/prak/Dev/gcc-install --disable-bootstrap Thread model: posix gcc version 4.6.0 20100716 (experimental) (GCC) COLLECT_GCC_OPTIONS='-v' '-std=c++0x' '-shared-libgcc' '-mtune=generic' '-march=pentiumpro' /home/prak/Dev/gcc-install/libexec/gcc/i686-pc-linux-gnu/4.6.0/cc1plus -quiet -v -D_GNU_SOURCE has_construct.cc -quiet -dumpbase has_construct.cc -mtune=generic -march=pentiumpro -auxbase has_construct -std=c++0x -version -o /tmp/ccY4xmeE.s GNU C++ (GCC) version 4.6.0 20100716 (experimental) (i686-pc-linux-gnu) compiled by GNU C version 4.3.4, GMP version 4.3.2, MPFR version 3.0.0, MPC version 0.8.2 GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096 ignoring nonexistent directory "/usr/local/include" ignoring nonexistent directory "/home/prak/Dev/gcc-install/lib/gcc/i686-pc-linux-gnu/4.6.0/../../../../i686-pc-linux-gnu/include" #include "..." search starts here: #include <...> search starts here: /home/prak/Dev/gcc-install/lib/gcc/i686-pc-linux-gnu/4.6.0/../../../../include/c++/4.6.0 /home/prak/Dev/gcc-install/lib/gcc/i686-pc-linux-gnu/4.6.0/../../../../include/c++/4.6.0/i686-pc-linux-gnu /home/prak/Dev/gcc-install/lib/gcc/i686-pc-linux-gnu/4.6.0/../../../../include/c++/4.6.0/backward /home/prak/Dev/gcc-install/include /home/prak/Dev/gcc-install/lib/gcc/i686-pc-linux-gnu/4.6.0/include /home/prak/Dev/gcc-install/lib/gcc/i686-pc-linux-gnu/4.6.0/include-fixed /usr/include End of search list. GNU C++ (GCC) version 4.6.0 20100716 (experimental) (i686-pc-linux-gnu) compiled by GNU C version 4.3.4, GMP version 4.3.2, MPFR version 3.0.0, MPC version 0.8.2 GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096 Compiler executable checksum: 6d1c47967936e3e68fa845533411d5d9 has_construct.cc: In instantiation of ‘const bool has_construct::value’: has_construct.cc:37:51: instantiated from here has_construct.cc:14:67: internal compiler error: Naruszenie ochrony pamiêci Please submit a full bug report, with preprocessed source if appropriate. See for instructions. Same with released 4.5.0 -- Summary: [C++0x] decltype of method call dependand on pack expansion crashes Product: gcc Version: 4.6.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: piotr dot rak at gmail dot com http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44967