This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/49420] New: [C++0x] compiler segfault using result_of
- From: "jarrydb at cse dot unsw.edu.au" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 15 Jun 2011 11:32:42 +0000
- Subject: [Bug c++/49420] New: [C++0x] compiler segfault using result_of
- Auto-submitted: auto-generated
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=49420
Summary: [C++0x] compiler segfault using result_of
Product: gcc
Version: 4.7.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: jarrydb@cse.unsw.edu.au
Created attachment 24535
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=24535
result of segfaults
The compiler segfaults in the attached code. It uses result_of of a struct
which has an operator() with a return type defined by recursive instantiations
of decltype.
g++ --std=gnu++0x result_of_segfault.ii
â
In file included from result_of_segfault.cpp:1:0:
/home/jarryd/current/soft/install-latest/lib/gcc/x86_64-unknown-linux-gnu/4.7.0/../../../../include/c++/4.7.0/type_traits:
In instantiation of âstd::_Result_of_impl<false, false, array_get, A, int, int,
int>â:
/home/jarryd/current/soft/install-latest/lib/gcc/x86_64-unknown-linux-gnu/4.7.0/../../../../include/c++/4.7.0/type_traits:1806:12:
required from âstruct std::result_of<array_get(A, int, int, int)>â
result_of_segfault.cpp:33:33: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/home/jarryd/current/soft/install-latest/libexec/gcc/x86_64-unknown-linux-gnu/4.7.0/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: /home/jarryd/current/soft/src/gcc-svn/configure
--prefix=/home/jarryd/current/soft/install-latest --disable-multilib
--enable-languages=c,c++,go : (reconfigured)
/home/jarryd/current/soft/src/gcc-svn/configure
--prefix=/home/jarryd/current/soft/install-latest --disable-multilib
--enable-languages=c,c++,go,lto --no-create --no-recursion : (reconfigured)
/home/jarryd/current/soft/src/gcc-svn/configure
--prefix=/home/jarryd/current/soft/install-latest --disable-multilib
--enable-languages=c,c++,go,lto --no-create --no-recursion
Thread model: posix
gcc version 4.7.0 20110615 (experimental) (GCC)