public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/32839]  New: internal compiler error: Segmentation fault (templates)
@ 2007-07-20 12:40 danny dot boelens at artwork-systems dot com
  2007-07-20 12:42 ` [Bug c++/32839] " danny dot boelens at artwork-systems dot com
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: danny dot boelens at artwork-systems dot com @ 2007-07-20 12:40 UTC (permalink / raw)
  To: gcc-bugs

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 3069 bytes --]

Yesterday, one of my collegues ran into an internal compiler error when playing
with some template code.

Although she ran into the ICE on Mac OS X with an Apple gcc 4.01 build, it was
easy enough to reproduce it on a linux box with a GNU gcc build. I'm logging
this against 4.2.1, but it seems every 4.x version segfaults; I tested with
4.02, 4.1-20060113 (yep, some old build laying around), 4.2.1 and even with the
latest 4.3-20070713.

I created a small test case (see attachment) and this is the output I get with
4.2.1:

dannyb@linux:~/bugs/ice> ~/opt/gcc-4.2.1/bin/g++ -v -o test test.cpp
Using built-in specs.
Target: i686-pc-linux-gnu
Configured with: ../gcc-4.2.1/configure --prefix=/home/dannyb/opt/gcc-4.2.1
--enable-languages=c,c++
Thread model: posix
gcc version 4.2.1
 /home/dannyb/opt/gcc-4.2.1/libexec/gcc/i686-pc-linux-gnu/4.2.1/cc1plus -quiet
-v -D_GNU_SOURCE test.cpp -quiet -dumpbase test.cpp -mtune=generic -auxbase
test -version -o /tmp/ccyPKN6k.s
ignoring nonexistent directory
"/home/dannyb/opt/gcc-4.2.1/lib/gcc/i686-pc-linux-gnu/4.2.1/../../../../i686-pc-linux-gnu/include"
#include "..." search starts here:
#include <...> search starts here:

/home/dannyb/opt/gcc-4.2.1/lib/gcc/i686-pc-linux-gnu/4.2.1/../../../../include/c++/4.2.1

/home/dannyb/opt/gcc-4.2.1/lib/gcc/i686-pc-linux-gnu/4.2.1/../../../../include/c++/4.2.1/i686-pc-linux-gnu

/home/dannyb/opt/gcc-4.2.1/lib/gcc/i686-pc-linux-gnu/4.2.1/../../../../include/c++/4.2.1/backward
 /usr/local/include
 /home/dannyb/opt/gcc-4.2.1/include
 /home/dannyb/opt/gcc-4.2.1/lib/gcc/i686-pc-linux-gnu/4.2.1/include
 /usr/include
End of search list.
GNU C++ version 4.2.1 (i686-pc-linux-gnu)
        compiled by GNU C version 4.2.1.
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: cfede80d80c2b8e19355e4026d77f0b9
test.cpp: In member function ‘void ScopeImpl<F>::Execute() [with F = void
(*)(int)]’:
test.cpp:31:   instantiated from ‘static void ScopeImplBase::SafeExecute(J&)
[with J = ScopeImpl<void (*)(int)>]’
test.cpp:50:   instantiated from ‘ScopeImpl<F>::~ScopeImpl() [with F = void
(*)(int)]’
test.cpp:46:   instantiated from ‘static void ScopeImpl<F>::MakeGuard(F) [with
F = void (*)(int)]’
test.cpp:68:   instantiated from ‘void DoAtExit(F) [with F = void (*)(int)]’
test.cpp:74:   instantiated from here
test.cpp:54: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.


-- 
           Summary: internal compiler error: Segmentation fault (templates)
           Product: gcc
           Version: 4.2.1
            Status: UNCONFIRMED
          Severity: major
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: danny dot boelens at artwork-systems dot com
 GCC build triplet: i686-pc-linux-gnu
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu


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


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

* [Bug c++/32839] internal compiler error: Segmentation fault (templates)
  2007-07-20 12:40 [Bug c++/32839] New: internal compiler error: Segmentation fault (templates) danny dot boelens at artwork-systems dot com
@ 2007-07-20 12:42 ` danny dot boelens at artwork-systems dot com
  2007-07-22 16:37 ` nathan at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: danny dot boelens at artwork-systems dot com @ 2007-07-20 12:42 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from danny dot boelens at artwork-systems dot com  2007-07-20 12:41 -------
Created an attachment (id=13944)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=13944&action=view)
Test case that triggers the ICE


-- 


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


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

* [Bug c++/32839] internal compiler error: Segmentation fault (templates)
  2007-07-20 12:40 [Bug c++/32839] New: internal compiler error: Segmentation fault (templates) danny dot boelens at artwork-systems dot com
  2007-07-20 12:42 ` [Bug c++/32839] " danny dot boelens at artwork-systems dot com
@ 2007-07-22 16:37 ` nathan at gcc dot gnu dot org
  2007-07-22 16:50 ` nathan at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: nathan at gcc dot gnu dot org @ 2007-07-22 16:37 UTC (permalink / raw)
  To: gcc-bugs



-- 

nathan at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2007-07-22 16:37:14
               date|                            |


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


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

* [Bug c++/32839] internal compiler error: Segmentation fault (templates)
  2007-07-20 12:40 [Bug c++/32839] New: internal compiler error: Segmentation fault (templates) danny dot boelens at artwork-systems dot com
  2007-07-20 12:42 ` [Bug c++/32839] " danny dot boelens at artwork-systems dot com
  2007-07-22 16:37 ` nathan at gcc dot gnu dot org
@ 2007-07-22 16:50 ` nathan at gcc dot gnu dot org
  2007-07-22 17:08 ` nathan at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: nathan at gcc dot gnu dot org @ 2007-07-22 16:50 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from nathan at gcc dot gnu dot org  2007-07-22 16:49 -------
Created an attachment (id=13949)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=13949&action=view)
Reduced testcase


-- 


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


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

* [Bug c++/32839] internal compiler error: Segmentation fault (templates)
  2007-07-20 12:40 [Bug c++/32839] New: internal compiler error: Segmentation fault (templates) danny dot boelens at artwork-systems dot com
                   ` (2 preceding siblings ...)
  2007-07-22 16:50 ` nathan at gcc dot gnu dot org
@ 2007-07-22 17:08 ` nathan at gcc dot gnu dot org
  2007-07-22 17:48 ` nathan at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: nathan at gcc dot gnu dot org @ 2007-07-22 17:08 UTC (permalink / raw)
  To: gcc-bugs



-- 

nathan at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |nathan at gcc dot gnu dot
                   |dot org                     |org
             Status|NEW                         |ASSIGNED
   Last reconfirmed|2007-07-22 16:37:14         |2007-07-22 17:08:33
               date|                            |


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


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

* [Bug c++/32839] internal compiler error: Segmentation fault (templates)
  2007-07-20 12:40 [Bug c++/32839] New: internal compiler error: Segmentation fault (templates) danny dot boelens at artwork-systems dot com
                   ` (3 preceding siblings ...)
  2007-07-22 17:08 ` nathan at gcc dot gnu dot org
@ 2007-07-22 17:48 ` nathan at gcc dot gnu dot org
  2007-07-22 18:47 ` nathan at gcc dot gnu dot org
  2007-08-06 21:50 ` pinskia at gcc dot gnu dot org
  6 siblings, 0 replies; 8+ messages in thread
From: nathan at gcc dot gnu dot org @ 2007-07-22 17:48 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from nathan at gcc dot gnu dot org  2007-07-22 17:48 -------


2007-07-22  Nathan Sidwell  <nathan@codesourcery.com>

        cp/
        PR c++/32839
        * typeck.c (convert_arguments): Only use default args if we have
        a function decl.

        testsuite/
        PR c++/32839
        * g++.dg/expr/call4.C: New.
        * g++.dg/expr/call5.C: New.


-- 

nathan at gcc dot gnu dot org changed:

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


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


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

* [Bug c++/32839] internal compiler error: Segmentation fault (templates)
  2007-07-20 12:40 [Bug c++/32839] New: internal compiler error: Segmentation fault (templates) danny dot boelens at artwork-systems dot com
                   ` (4 preceding siblings ...)
  2007-07-22 17:48 ` nathan at gcc dot gnu dot org
@ 2007-07-22 18:47 ` nathan at gcc dot gnu dot org
  2007-08-06 21:50 ` pinskia at gcc dot gnu dot org
  6 siblings, 0 replies; 8+ messages in thread
From: nathan at gcc dot gnu dot org @ 2007-07-22 18:47 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from nathan at gcc dot gnu dot org  2007-07-22 18:47 -------
Subject: Bug 32839

Author: nathan
Date: Sun Jul 22 18:46:51 2007
New Revision: 126829

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=126829
Log:
cp/
        PR c++/32839
        * typeck.c (convert_arguments): Only use default args if we have
        a function decl.

testsuite/
        PR c++/32839
        * g++.dg/expr/call4.C: New.
        * g++.dg/expr/call5.C: New.

Added:
    trunk/gcc/testsuite/g++.dg/expr/call4.C
    trunk/gcc/testsuite/g++.dg/expr/call5.C
Modified:
    trunk/gcc/cp/ChangeLog
    trunk/gcc/cp/typeck.c
    trunk/gcc/testsuite/ChangeLog


-- 


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


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

* [Bug c++/32839] internal compiler error: Segmentation fault (templates)
  2007-07-20 12:40 [Bug c++/32839] New: internal compiler error: Segmentation fault (templates) danny dot boelens at artwork-systems dot com
                   ` (5 preceding siblings ...)
  2007-07-22 18:47 ` nathan at gcc dot gnu dot org
@ 2007-08-06 21:50 ` pinskia at gcc dot gnu dot org
  6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2007-08-06 21:50 UTC (permalink / raw)
  To: gcc-bugs



-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|major                       |normal
   Target Milestone|---                         |4.3.0


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


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

end of thread, other threads:[~2007-08-06 21:50 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-07-20 12:40 [Bug c++/32839] New: internal compiler error: Segmentation fault (templates) danny dot boelens at artwork-systems dot com
2007-07-20 12:42 ` [Bug c++/32839] " danny dot boelens at artwork-systems dot com
2007-07-22 16:37 ` nathan at gcc dot gnu dot org
2007-07-22 16:50 ` nathan at gcc dot gnu dot org
2007-07-22 17:08 ` nathan at gcc dot gnu dot org
2007-07-22 17:48 ` nathan at gcc dot gnu dot org
2007-07-22 18:47 ` nathan at gcc dot gnu dot org
2007-08-06 21:50 ` 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).