public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/46947] New: Segmentation Fault compiling templates with function pointers
@ 2010-12-14 22:01 cacoyi at gmail dot com
  2010-12-14 22:18 ` [Bug c++/46947] " redi at gcc dot gnu.org
  0 siblings, 1 reply; 2+ messages in thread
From: cacoyi at gmail dot com @ 2010-12-14 22:01 UTC (permalink / raw)
  To: gcc-bugs

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: unassigned@gcc.gnu.org
        ReportedBy: cacoyi@gmail.com


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)


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

* [Bug c++/46947] Segmentation Fault compiling templates with function pointers
  2010-12-14 22:01 [Bug c++/46947] New: Segmentation Fault compiling templates with function pointers cacoyi at gmail dot com
@ 2010-12-14 22:18 ` redi at gcc dot gnu.org
  0 siblings, 0 replies; 2+ messages in thread
From: redi at gcc dot gnu.org @ 2010-12-14 22:18 UTC (permalink / raw)
  To: gcc-bugs

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

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |FIXED

--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> 2010-12-14 22:18:38 UTC ---
GCC 4.2 is no longer maintained, you need to report it to Apple or use a more
recent, official FSF release.

4.4.5 gives

main.cpp: In function ‘int main(int, char* const*)’:
main.cpp:17: sorry, unimplemented: mangling template_id_expr

and 4.5.2 compiles it successfully


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

end of thread, other threads:[~2010-12-14 22:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-12-14 22:01 [Bug c++/46947] New: Segmentation Fault compiling templates with function pointers cacoyi at gmail dot com
2010-12-14 22:18 ` [Bug c++/46947] " redi 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).