public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/25383]  New: Crash when using certain function pointer in template -- but presence of another function will avoid the crash
@ 2005-12-13  7:34 victor at thedods dot com
  2005-12-13  7:35 ` [Bug c++/25383] " victor at thedods dot com
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: victor at thedods dot com @ 2005-12-13  7:34 UTC (permalink / raw)
  To: gcc-bugs

This example, as is, will cause:

blah.cpp: In function 'void Load() [with T = Blah, T* (* LoadFunction)() =
Blah::Create]':
blah.cpp:24:   instantiated from here
blah.cpp:13: internal compiler error: in build_call, at cp/call.c:323

The command is `g++ -c blah.cpp -save-temps`

`gcc -v` produces
Using built-in specs.
Target: i486-linux-gnu
Configured with: ../src/configure -v
--enable-languages=c,c++,java,f95,objc,ada,treelang --prefix=/usr
--enable-shared --with-system-zlib --libexecdir=/usr/lib
--without-included-gettext --enable-threads=posix --enable-nls
--program-suffix=-4.0 --enable-__cxa_atexit --enable-clocale=gnu
--enable-libstdcxx-debug --enable-java-awt=gtk-default --enable-gtk-cairo
--with-java-home=/usr/lib/jvm/java-1.4.2-gcj-4.0-1.4.2.0/jre --enable-mpfr
--disable-werror --enable-checking=release i486-linux-gnu
Thread model: posix
gcc version 4.0.3 20051201 (prerelease) (Debian 4.0.2-5)


-- 
           Summary: Crash when using certain function pointer in template --
                    but presence of another function will avoid the crash
           Product: gcc
           Version: 4.0.3
            Status: UNCONFIRMED
          Severity: minor
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: victor at thedods dot com
 GCC build triplet: i486-linux-gnu
  GCC host triplet: i486-linux-gnu
GCC target triplet: i486-linux-gnu


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


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

* [Bug c++/25383] Crash when using certain function pointer in template -- but presence of another function will avoid the crash
  2005-12-13  7:34 [Bug c++/25383] New: Crash when using certain function pointer in template -- but presence of another function will avoid the crash victor at thedods dot com
@ 2005-12-13  7:35 ` victor at thedods dot com
  2005-12-13  7:36 ` victor at thedods dot com
  2005-12-13  8:06 ` pinskia at gcc dot gnu dot org
  2 siblings, 0 replies; 4+ messages in thread
From: victor at thedods dot com @ 2005-12-13  7:35 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from victor at thedods dot com  2005-12-13 07:35 -------
Created an attachment (id=10464)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=10464&action=view)
preprocessed source file

Here is the preprocessed source file (not much different from the original,
which is attached next).


-- 


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


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

* [Bug c++/25383] Crash when using certain function pointer in template -- but presence of another function will avoid the crash
  2005-12-13  7:34 [Bug c++/25383] New: Crash when using certain function pointer in template -- but presence of another function will avoid the crash victor at thedods dot com
  2005-12-13  7:35 ` [Bug c++/25383] " victor at thedods dot com
@ 2005-12-13  7:36 ` victor at thedods dot com
  2005-12-13  8:06 ` pinskia at gcc dot gnu dot org
  2 siblings, 0 replies; 4+ messages in thread
From: victor at thedods dot com @ 2005-12-13  7:36 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from victor at thedods dot com  2005-12-13 07:36 -------
Created an attachment (id=10465)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=10465&action=view)
Source file (with a function that, if uncommented, prevents the crash)

For some reason, when the commented-out function
"WhenThisFunctionIsUncommentedGCCDoesNotCrash" is uncommented, no crash occurs.


-- 


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


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

* [Bug c++/25383] Crash when using certain function pointer in template -- but presence of another function will avoid the crash
  2005-12-13  7:34 [Bug c++/25383] New: Crash when using certain function pointer in template -- but presence of another function will avoid the crash victor at thedods dot com
  2005-12-13  7:35 ` [Bug c++/25383] " victor at thedods dot com
  2005-12-13  7:36 ` victor at thedods dot com
@ 2005-12-13  8:06 ` pinskia at gcc dot gnu dot org
  2 siblings, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-12-13  8:06 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from pinskia at gcc dot gnu dot org  2005-12-13 08:06 -------


*** This bug has been marked as a duplicate of 25364 ***


-- 

pinskia at gcc dot gnu dot org changed:

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


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


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

end of thread, other threads:[~2005-12-13  8:06 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-12-13  7:34 [Bug c++/25383] New: Crash when using certain function pointer in template -- but presence of another function will avoid the crash victor at thedods dot com
2005-12-13  7:35 ` [Bug c++/25383] " victor at thedods dot com
2005-12-13  7:36 ` victor at thedods dot com
2005-12-13  8:06 ` pinskia at gcc dot gnu dot 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).