public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/33035] New: ICE on local class destructor. Regression?
@ 2007-08-09 11:50 vasili dot burdo at gmail dot com
2007-08-14 22:29 ` [Bug c++/33035] " pcarlini at suse dot de
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: vasili dot burdo at gmail dot com @ 2007-08-09 11:50 UTC (permalink / raw)
To: gcc-bugs
gcc-4.3-20070727 fails with ICE on code:
-----------------------------------
template<class A>
struct a {
template<class B>
struct b {
template<class C>
void f()
{
struct g
{
~g() {}//<--here
};
}
};
};
-----------------------------------
Compiler output is:
-----------------------------------
G++ -v -save-temps gcc-err.cpp
Using built-in specs.
Target: i686-pc-mingw32
Configured with: ../gcc-4.3-20070727/configure --disable-bootstrap
--enable-languages=c,c++ --with-gcc --with-gnu-ld --with-gnu-as --with-dwarf2
--without-stabs --disable-sjlj-exceptions --prefix=/mingw
--libexecdir=/mingw/lib --disable-werror --enable-threads --disable-nls
--disable-win32-registry --disable-shared --disable-libssp
--disable-libstdcxx-debug --disable-concept-checks
Thread model: win32
gcc version 4.3.0 20070727 (experimental)
d:/TOOLS/GCC/lib/gcc/i686-pc-mingw32/4.3.0/cc1plus.exe -E -quiet -v -iprefix
d:\tools\gcc\bin\../lib/gcc/i686-pc-mingw32/4.3.0/ gcc-err.cpp -mtune=generic
-fpch-preprocess -o gcc-err.ii
#include "..." search starts here:
#include <...> search starts here:
d:\TOOLS\GCC/include
d:\TOOLS\GCC/local/include
d:\TOOLS\GCC/win32api/include
d:/prj/libs/include
d:/prj/libs/boost
d:\tools\gcc\bin\../lib/gcc/i686-pc-mingw32/4.3.0/include
d:\tools\gcc\bin\../lib/gcc/i686-pc-mingw32/4.3.0/include-fixed
d:/TOOLS/GCC/include/c++/4.3.0
d:/TOOLS/GCC/include/c++/4.3.0/i686-pc-mingw32
d:/TOOLS/GCC/include/c++/4.3.0/backward
d:/TOOLS/GCC/include
d:/TOOLS/GCC/include
d:/TOOLS/GCC/lib/gcc/i686-pc-mingw32/4.3.0/include
d:/TOOLS/GCC/lib/gcc/i686-pc-mingw32/4.3.0/include-fixed
d:/TOOLS/GCC/lib/gcc/i686-pc-mingw32/4.3.0/include-fixed
d:/TOOLS/GCC/include
End of search list.
d:/TOOLS/GCC/lib/gcc/i686-pc-mingw32/4.3.0/cc1plus.exe -fpreprocessed
gcc-err.ii -quiet -dumpbase gcc-err.cpp -mtune=generic -auxbase gcc-err
-version -o gcc-err.s
GNU C++ version 4.3.0 20070727 (experimental) (i686-pc-mingw32)
compiled by GNU C version 4.2.0, GMP version 4.2.1, MPFR version 2.2.0.
GGC heuristics: --param ggc-min-expand=30 --param ggc-min-heapsize=4096
Compiler executable checksum: b6f7d618f50d2b0792a732058b53d781
gcc-err.cpp: In member function 'void a<A>::b<B>::f()':
gcc-err.cpp:10: internal compiler error: tree check: expected class 'type',
have 'declaration' (function_decl) in push_template_decl_real, at cp/pt.c:3917
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
-----------------------------------
3.4.2, 4.1.1 and 4.2.0 compile it well.
--
Summary: ICE on local class destructor. Regression?
Product: gcc
Version: 4.3.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: vasili dot burdo at gmail dot com
GCC build triplet: i686-pc-mingw32
GCC host triplet: i686-pc-mingw32
GCC target triplet: i686-pc-mingw32
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33035
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/33035] ICE on local class destructor. Regression?
2007-08-09 11:50 [Bug c++/33035] New: ICE on local class destructor. Regression? vasili dot burdo at gmail dot com
@ 2007-08-14 22:29 ` pcarlini at suse dot de
2007-08-14 22:32 ` pcarlini at suse dot de
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: pcarlini at suse dot de @ 2007-08-14 22:29 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from pcarlini at suse dot de 2007-08-14 22:29 -------
Yes, I can confirm this. The issue seems simple: at that line we are wrongly
calling TYPE_CONTEXT on a FUNCTION_DECL. In such circumstances the solution
normally adopted elsewhere is that in the draft, which in fact appear to work
well here too.
--
pcarlini at suse dot de changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |pcarlini at suse dot de
|dot org |
Status|UNCONFIRMED |ASSIGNED
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2007-08-14 22:29:24
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33035
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/33035] ICE on local class destructor. Regression?
2007-08-09 11:50 [Bug c++/33035] New: ICE on local class destructor. Regression? vasili dot burdo at gmail dot com
2007-08-14 22:29 ` [Bug c++/33035] " pcarlini at suse dot de
@ 2007-08-14 22:32 ` pcarlini at suse dot de
2007-08-15 9:07 ` [Bug c++/33035] [4.3 regression] ICE on local class destructor pcarlini at suse dot de
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: pcarlini at suse dot de @ 2007-08-14 22:32 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from pcarlini at suse dot de 2007-08-14 22:32 -------
For some reason, I can't attach the patch, here it is, anyway:
Index: pt.c
===================================================================
*** pt.c (revision 127493)
--- pt.c (working copy)
*************** push_template_decl_real (tree decl, bool
*** 3913,3919 ****
if (current == decl)
current = ctx;
else
! current = TYPE_CONTEXT (current);
}
}
--- 3913,3921 ----
if (current == decl)
current = ctx;
else
! current = (TYPE_P (current)
! ? TYPE_CONTEXT (current)
! : DECL_CONTEXT (current));
}
}
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33035
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/33035] [4.3 regression] ICE on local class destructor
2007-08-09 11:50 [Bug c++/33035] New: ICE on local class destructor. Regression? vasili dot burdo at gmail dot com
` (3 preceding siblings ...)
2007-08-15 9:07 ` pcarlini at suse dot de
@ 2007-08-15 9:07 ` paolo at gcc dot gnu dot org
2007-08-15 15:25 ` pcarlini at suse dot de
5 siblings, 0 replies; 7+ messages in thread
From: paolo at gcc dot gnu dot org @ 2007-08-15 9:07 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from paolo at gcc dot gnu dot org 2007-08-15 09:06 -------
Subject: Bug 33035
Author: paolo
Date: Wed Aug 15 09:06:42 2007
New Revision: 127508
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=127508
Log:
/cp
2007-08-15 Paolo Carlini <pcarlini@suse.de>
PR c++/33035
* pt.c (push_template_decl_real): Depending on TYPE_P
use either TYPE_CONTEXT or DECL_CONTEXT.
/testsuite
2007-08-15 Paolo Carlini <pcarlini@suse.de>
PR c++/33035
* g++.dg/template/crash68.C: New.
Added:
trunk/gcc/testsuite/g++.dg/template/crash68.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/pt.c
trunk/gcc/testsuite/ChangeLog
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33035
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/33035] [4.3 regression] ICE on local class destructor
2007-08-09 11:50 [Bug c++/33035] New: ICE on local class destructor. Regression? vasili dot burdo at gmail dot com
` (2 preceding siblings ...)
2007-08-15 9:07 ` [Bug c++/33035] [4.3 regression] ICE on local class destructor pcarlini at suse dot de
@ 2007-08-15 9:07 ` pcarlini at suse dot de
2007-08-15 9:07 ` paolo at gcc dot gnu dot org
2007-08-15 15:25 ` pcarlini at suse dot de
5 siblings, 0 replies; 7+ messages in thread
From: pcarlini at suse dot de @ 2007-08-15 9:07 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from pcarlini at suse dot de 2007-08-15 09:07 -------
Fixed.
--
pcarlini at suse dot de changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33035
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/33035] [4.3 regression] ICE on local class destructor
2007-08-09 11:50 [Bug c++/33035] New: ICE on local class destructor. Regression? vasili dot burdo at gmail dot com
2007-08-14 22:29 ` [Bug c++/33035] " pcarlini at suse dot de
2007-08-14 22:32 ` pcarlini at suse dot de
@ 2007-08-15 9:07 ` pcarlini at suse dot de
2007-08-15 9:07 ` pcarlini at suse dot de
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: pcarlini at suse dot de @ 2007-08-15 9:07 UTC (permalink / raw)
To: gcc-bugs
--
pcarlini at suse dot de changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |4.3.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33035
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/33035] [4.3 regression] ICE on local class destructor
2007-08-09 11:50 [Bug c++/33035] New: ICE on local class destructor. Regression? vasili dot burdo at gmail dot com
` (4 preceding siblings ...)
2007-08-15 9:07 ` paolo at gcc dot gnu dot org
@ 2007-08-15 15:25 ` pcarlini at suse dot de
5 siblings, 0 replies; 7+ messages in thread
From: pcarlini at suse dot de @ 2007-08-15 15:25 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from pcarlini at suse dot de 2007-08-15 15:25 -------
*** Bug 31516 has been marked as a duplicate of this bug. ***
--
pcarlini at suse dot de changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |reichelt at gcc dot gnu dot
| |org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33035
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2007-08-15 15:25 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-08-09 11:50 [Bug c++/33035] New: ICE on local class destructor. Regression? vasili dot burdo at gmail dot com
2007-08-14 22:29 ` [Bug c++/33035] " pcarlini at suse dot de
2007-08-14 22:32 ` pcarlini at suse dot de
2007-08-15 9:07 ` [Bug c++/33035] [4.3 regression] ICE on local class destructor pcarlini at suse dot de
2007-08-15 9:07 ` pcarlini at suse dot de
2007-08-15 9:07 ` paolo at gcc dot gnu dot org
2007-08-15 15:25 ` pcarlini at suse dot de
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).