http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46947
Summary: Segmentation Fault compiling templates with function
pointers
Product: gcc
Version: 4.2.1
Status: UNCONFIRMED
Severity: major
Priority: P3
Component: c++
AssignedTo: [email protected]
ReportedBy: [email protected]
Created attachment 22756
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=22756
Files needed to reproduce and report the bug.
When the source in the attached archive is compiled with:
g++ -save-temps main.cpp
the output is:
main.cpp: In member function ‘FTemplate<_Binary<FuncA, FuncB> >
FTemplate<FuncA>::operator|(const FTemplate<FuncB>&) const [with int (*
FuncB)() = _Nullary, int (* FuncA)() = _Nullary]’:
main.cpp:11: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://developer.apple.com/bugreporter> for instructions.
Admittedly this problem might be Apple specific, but it is probably worth
checking, as I understand it is the same code base and I'm not sure how
forthcoming Apple is with bugs.
g++ -v:
Using built-in specs.
Target: i686-apple-darwin10
Configured with: /var/tmp/gcc/gcc-5664~105/src/configure --disable-checking
--enable-werror --prefix=/usr
--mandir=/share/man --enable-languages=c,objc,c++,obj-c++
--program-transform-name=/^[cg][^.-]*$/s/$/-4.2/
--with-slibdir=/usr/lib --build=i686-apple-darwin10
--program-prefix=i686-apple-darwin10- --host=x86_64-apple-darwin10
--target=i686-apple-darwin10 --with-gxx-include-dir=/include/c++/4.2.1
Thread model: posix
gcc version 4.2.1 (Apple Inc. build 5664)