public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/37037] New: ICE on template class member function definition after explciit template class instantation
@ 2008-08-06 13:44 zweije at xs4all dot nl
2008-08-06 13:50 ` [Bug c++/37037] " zweije at xs4all dot nl
` (12 more replies)
0 siblings, 13 replies; 14+ messages in thread
From: zweije at xs4all dot nl @ 2008-08-06 13:44 UTC (permalink / raw)
To: gcc-bugs
Following snippet causes compiler to produce internal compiler error:
typedef void F(void);
template <typename T> struct S
{
static F f;
};
template class S<int>;
template <class T> void S<T>::f(void)
{}
I'm not sure it is valid to define S<T>::f() after instantiating the class, but
even if not, an ICE is not a proper response for a compiler in any case. #24511
mentions that all member templates (template members?) must be defined before
explicit instantiation although I don't read that per se in my copy of the
standard.
There might be a vague relation to #24791 if there is g++-internal confusion
about f being a static data member. This confusion might be exhibited in #33972
as well.
Ciao.
Vincent.
--
Summary: ICE on template class member function definition after
explciit template class instantation
Product: gcc
Version: 4.3.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: zweije at xs4all dot nl
GCC build triplet: x86_64-linux-gnu
GCC host triplet: x86_64-linux-gnu
GCC target triplet: x86_64-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37037
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug c++/37037] ICE on template class member function definition after explciit template class instantation
2008-08-06 13:44 [Bug c++/37037] New: ICE on template class member function definition after explciit template class instantation zweije at xs4all dot nl
@ 2008-08-06 13:50 ` zweije at xs4all dot nl
2008-08-11 0:22 ` pinskia at gcc dot gnu dot org
` (11 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: zweije at xs4all dot nl @ 2008-08-06 13:50 UTC (permalink / raw)
To: gcc-bugs
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1495 bytes --]
------- Comment #1 from zweije at xs4all dot nl 2008-08-06 13:48 -------
$g++ -o crash.o crash.cpp
+ /usr/bin/g++-4.3 -L/home/vincent/lib32 -o crash.o crash.cpp
crash.cpp: In static member function static void S<T>::f() [with T = int]:
crash.cpp:6: instantiated from here
crash.cpp:4: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-4.3/README.Bugs> for instructions.
$g++ -v
+ /usr/bin/g++-4.3 -L/home/vincent/lib32 -v
Using built-in specs.
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Debian 4.3.1-2'
--with-bugurl=file:///usr/share/doc/gcc-4.3/README.Bugs
--enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --enable-shared
--with-system-zlib --libexecdir=/usr/lib --without-included-gettext
--enable-threads=posix --enable-nls --with-gxx-include-dir=/usr/include/c++/4.3
--program-suffix=-4.3 --enable-clocale=gnu --enable-libstdcxx-debug
--enable-objc-gc --enable-mpfr --enable-cld --enable-checking=release
--build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 4.3.1 (Debian 4.3.1-2)
$
--
zweije at xs4all dot nl changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |ice-on-invalid-code
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37037
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug c++/37037] ICE on template class member function definition after explciit template class instantation
2008-08-06 13:44 [Bug c++/37037] New: ICE on template class member function definition after explciit template class instantation zweije at xs4all dot nl
2008-08-06 13:50 ` [Bug c++/37037] " zweije at xs4all dot nl
@ 2008-08-11 0:22 ` pinskia at gcc dot gnu dot org
2008-09-27 21:49 ` fang at csl dot cornell dot edu
` (10 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2008-08-11 0:22 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from pinskia at gcc dot gnu dot org 2008-08-11 00:21 -------
It compiled with 4.0.1.
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |pinskia at gcc dot gnu dot
| |org
Known to work| |4.4.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37037
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug c++/37037] ICE on template class member function definition after explciit template class instantation
2008-08-06 13:44 [Bug c++/37037] New: ICE on template class member function definition after explciit template class instantation zweije at xs4all dot nl
2008-08-06 13:50 ` [Bug c++/37037] " zweije at xs4all dot nl
2008-08-11 0:22 ` pinskia at gcc dot gnu dot org
@ 2008-09-27 21:49 ` fang at csl dot cornell dot edu
2008-12-27 14:57 ` [Bug c++/37037] [4.2/4.3/4.4 Regression] " pinskia at gcc dot gnu dot org
` (9 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: fang at csl dot cornell dot edu @ 2008-09-27 21:49 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from fang at csl dot cornell dot edu 2008-09-27 21:48 -------
original testcase ICEs 4.3.2 also
fang% g++-4 -v
Using built-in specs.
Target: powerpc-apple-darwin8
Configured with: ../gcc-4.3.2/configure --prefix=/sw --prefix=/sw/lib/gcc4.3
--mandir=/sw/share/man --infodir=/sw/share/info
--enable-languages=c,c++,fortran,objc,java --build=powerpc-apple-darwin8
--with-gmp=/sw --with-libiconv-prefix=/sw --with-system-zlib
--x-includes=/usr/X11R6/include --x-libraries=/usr/X11R6/lib
--disable-libjava-multilib
Thread model: posix
gcc version 4.3.2 (GCC)
fang% g++-4 -ansi -pedantic-errors -c temp.cc -o temp.o
temp.cc: In static member function 'static void S<T>::f() [with T = int]':
temp.cc:6: instantiated from here
temp.cc:4: internal compiler error: Bus error
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instruction
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37037
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug c++/37037] [4.2/4.3/4.4 Regression] ICE on template class member function definition after explciit template class instantation
2008-08-06 13:44 [Bug c++/37037] New: ICE on template class member function definition after explciit template class instantation zweije at xs4all dot nl
` (2 preceding siblings ...)
2008-09-27 21:49 ` fang at csl dot cornell dot edu
@ 2008-12-27 14:57 ` pinskia at gcc dot gnu dot org
2008-12-29 21:55 ` rguenth at gcc dot gnu dot org
` (8 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2008-12-27 14:57 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from pinskia at gcc dot gnu dot org 2008-12-27 14:55 -------
Confirmed.
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
GCC build triplet|x86_64-linux-gnu |
GCC host triplet|x86_64-linux-gnu |
GCC target triplet|x86_64-linux-gnu |
Known to fail|4.4.0 |4.4.0 4.1.1 4.3.3
Last reconfirmed|0000-00-00 00:00:00 |2008-12-27 14:55:24
date| |
Summary|ICE on template class member|[4.2/4.3/4.4 Regression] ICE
|function definition after |on template class member
|explciit template class |function definition after
|instantation |explciit template class
| |instantation
Target Milestone|--- |4.2.5
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37037
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug c++/37037] [4.2/4.3/4.4 Regression] ICE on template class member function definition after explciit template class instantation
2008-08-06 13:44 [Bug c++/37037] New: ICE on template class member function definition after explciit template class instantation zweije at xs4all dot nl
` (3 preceding siblings ...)
2008-12-27 14:57 ` [Bug c++/37037] [4.2/4.3/4.4 Regression] " pinskia at gcc dot gnu dot org
@ 2008-12-29 21:55 ` rguenth at gcc dot gnu dot org
2009-01-29 11:24 ` paolo dot carlini at oracle dot com
` (7 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2008-12-29 21:55 UTC (permalink / raw)
To: gcc-bugs
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P3 |P2
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37037
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug c++/37037] [4.2/4.3/4.4 Regression] ICE on template class member function definition after explciit template class instantation
2008-08-06 13:44 [Bug c++/37037] New: ICE on template class member function definition after explciit template class instantation zweije at xs4all dot nl
` (4 preceding siblings ...)
2008-12-29 21:55 ` rguenth at gcc dot gnu dot org
@ 2009-01-29 11:24 ` paolo dot carlini at oracle dot com
2009-03-31 20:57 ` [Bug c++/37037] [4.3/4.4/4.5 Regression] ICE on template class member function definition after explicit " jsm28 at gcc dot gnu dot org
` (6 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: paolo dot carlini at oracle dot com @ 2009-01-29 11:24 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from paolo dot carlini at oracle dot com 2009-01-29 11:23 -------
Are we really sure this is invalid? For one, EDG doesn't agree...
--
paolo dot carlini at oracle dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |paolo at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37037
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug c++/37037] [4.3/4.4/4.5 Regression] ICE on template class member function definition after explicit template class instantation
2008-08-06 13:44 [Bug c++/37037] New: ICE on template class member function definition after explciit template class instantation zweije at xs4all dot nl
` (5 preceding siblings ...)
2009-01-29 11:24 ` paolo dot carlini at oracle dot com
@ 2009-03-31 20:57 ` jsm28 at gcc dot gnu dot org
2009-08-04 12:43 ` rguenth at gcc dot gnu dot org
` (5 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: jsm28 at gcc dot gnu dot org @ 2009-03-31 20:57 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from jsm28 at gcc dot gnu dot org 2009-03-31 20:57 -------
Closing 4.2 branch.
--
jsm28 at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|[4.2/4.3/4.4/4.5 Regression]|[4.3/4.4/4.5 Regression] ICE
|ICE on template class member|on template class member
|function definition after |function definition after
|explicit template class |explicit template class
|instantation |instantation
Target Milestone|4.2.5 |4.3.4
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37037
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug c++/37037] [4.3/4.4/4.5 Regression] ICE on template class member function definition after explicit template class instantation
2008-08-06 13:44 [Bug c++/37037] New: ICE on template class member function definition after explciit template class instantation zweije at xs4all dot nl
` (6 preceding siblings ...)
2009-03-31 20:57 ` [Bug c++/37037] [4.3/4.4/4.5 Regression] ICE on template class member function definition after explicit " jsm28 at gcc dot gnu dot org
@ 2009-08-04 12:43 ` rguenth at gcc dot gnu dot org
2009-11-12 22:17 ` jason at gcc dot gnu dot org
` (4 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2009-08-04 12:43 UTC (permalink / raw)
To: gcc-bugs
------- Comment #7 from rguenth at gcc dot gnu dot org 2009-08-04 12:29 -------
GCC 4.3.4 is being released, adjusting target milestone.
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|4.3.4 |4.3.5
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37037
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug c++/37037] [4.3/4.4/4.5 Regression] ICE on template class member function definition after explicit template class instantation
2008-08-06 13:44 [Bug c++/37037] New: ICE on template class member function definition after explciit template class instantation zweije at xs4all dot nl
` (7 preceding siblings ...)
2009-08-04 12:43 ` rguenth at gcc dot gnu dot org
@ 2009-11-12 22:17 ` jason at gcc dot gnu dot org
2009-11-12 22:50 ` jason at gcc dot gnu dot org
` (3 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: jason at gcc dot gnu dot org @ 2009-11-12 22:17 UTC (permalink / raw)
To: gcc-bugs
--
jason at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |jason at gcc dot gnu dot org
|dot org |
Status|NEW |ASSIGNED
Keywords|ice-on-invalid-code |ice-on-valid-code
Last reconfirmed|2009-04-16 16:30:01 |2009-11-12 22:17:08
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37037
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug c++/37037] [4.3/4.4/4.5 Regression] ICE on template class member function definition after explicit template class instantation
2008-08-06 13:44 [Bug c++/37037] New: ICE on template class member function definition after explciit template class instantation zweije at xs4all dot nl
` (8 preceding siblings ...)
2009-11-12 22:17 ` jason at gcc dot gnu dot org
@ 2009-11-12 22:50 ` jason at gcc dot gnu dot org
2009-11-12 23:22 ` jason at gcc dot gnu dot org
` (2 subsequent siblings)
12 siblings, 0 replies; 14+ messages in thread
From: jason at gcc dot gnu dot org @ 2009-11-12 22:50 UTC (permalink / raw)
To: gcc-bugs
------- Comment #8 from jason at gcc dot gnu dot org 2009-11-12 22:50 -------
Subject: Bug 37037
Author: jason
Date: Thu Nov 12 22:49:59 2009
New Revision: 154131
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=154131
Log:
PR c++/37037
* decl.c (grokdeclarator): Don't generate a void PARM_DECL.
Added:
trunk/gcc/testsuite/g++.dg/template/typedef21.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/decl.c
trunk/gcc/testsuite/ChangeLog
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37037
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug c++/37037] [4.3/4.4/4.5 Regression] ICE on template class member function definition after explicit template class instantation
2008-08-06 13:44 [Bug c++/37037] New: ICE on template class member function definition after explciit template class instantation zweije at xs4all dot nl
` (10 preceding siblings ...)
2009-11-12 23:22 ` jason at gcc dot gnu dot org
@ 2009-11-12 23:22 ` jason at gcc dot gnu dot org
2009-11-12 23:27 ` jason at gcc dot gnu dot org
12 siblings, 0 replies; 14+ messages in thread
From: jason at gcc dot gnu dot org @ 2009-11-12 23:22 UTC (permalink / raw)
To: gcc-bugs
------- Comment #9 from jason at gcc dot gnu dot org 2009-11-12 23:22 -------
Subject: Bug 37037
Author: jason
Date: Thu Nov 12 23:21:55 2009
New Revision: 154134
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=154134
Log:
PR c++/37037
* decl.c (grokdeclarator): Don't generate a void PARM_DECL.
Added:
branches/gcc-4_4-branch/gcc/testsuite/g++.dg/template/typedef21.C
Modified:
branches/gcc-4_4-branch/gcc/cp/ChangeLog
branches/gcc-4_4-branch/gcc/cp/decl.c
branches/gcc-4_4-branch/gcc/testsuite/ChangeLog
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37037
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug c++/37037] [4.3/4.4/4.5 Regression] ICE on template class member function definition after explicit template class instantation
2008-08-06 13:44 [Bug c++/37037] New: ICE on template class member function definition after explciit template class instantation zweije at xs4all dot nl
` (9 preceding siblings ...)
2009-11-12 22:50 ` jason at gcc dot gnu dot org
@ 2009-11-12 23:22 ` jason at gcc dot gnu dot org
2009-11-12 23:22 ` jason at gcc dot gnu dot org
2009-11-12 23:27 ` jason at gcc dot gnu dot org
12 siblings, 0 replies; 14+ messages in thread
From: jason at gcc dot gnu dot org @ 2009-11-12 23:22 UTC (permalink / raw)
To: gcc-bugs
------- Comment #10 from jason at gcc dot gnu dot org 2009-11-12 23:22 -------
Subject: Bug 37037
Author: jason
Date: Thu Nov 12 23:22:10 2009
New Revision: 154135
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=154135
Log:
PR c++/37037
* decl.c (grokdeclarator): Don't generate a void PARM_DECL.
Added:
branches/gcc-4_3-branch/gcc/testsuite/g++.dg/template/typedef21.C
Modified:
branches/gcc-4_3-branch/gcc/cp/ChangeLog
branches/gcc-4_3-branch/gcc/cp/decl.c
branches/gcc-4_3-branch/gcc/testsuite/ChangeLog
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37037
^ permalink raw reply [flat|nested] 14+ messages in thread
* [Bug c++/37037] [4.3/4.4/4.5 Regression] ICE on template class member function definition after explicit template class instantation
2008-08-06 13:44 [Bug c++/37037] New: ICE on template class member function definition after explciit template class instantation zweije at xs4all dot nl
` (11 preceding siblings ...)
2009-11-12 23:22 ` jason at gcc dot gnu dot org
@ 2009-11-12 23:27 ` jason at gcc dot gnu dot org
12 siblings, 0 replies; 14+ messages in thread
From: jason at gcc dot gnu dot org @ 2009-11-12 23:27 UTC (permalink / raw)
To: gcc-bugs
------- Comment #11 from jason at gcc dot gnu dot org 2009-11-12 23:27 -------
Fixed.
--
jason at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37037
^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2009-11-12 23:27 UTC | newest]
Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-08-06 13:44 [Bug c++/37037] New: ICE on template class member function definition after explciit template class instantation zweije at xs4all dot nl
2008-08-06 13:50 ` [Bug c++/37037] " zweije at xs4all dot nl
2008-08-11 0:22 ` pinskia at gcc dot gnu dot org
2008-09-27 21:49 ` fang at csl dot cornell dot edu
2008-12-27 14:57 ` [Bug c++/37037] [4.2/4.3/4.4 Regression] " pinskia at gcc dot gnu dot org
2008-12-29 21:55 ` rguenth at gcc dot gnu dot org
2009-01-29 11:24 ` paolo dot carlini at oracle dot com
2009-03-31 20:57 ` [Bug c++/37037] [4.3/4.4/4.5 Regression] ICE on template class member function definition after explicit " jsm28 at gcc dot gnu dot org
2009-08-04 12:43 ` rguenth at gcc dot gnu dot org
2009-11-12 22:17 ` jason at gcc dot gnu dot org
2009-11-12 22:50 ` jason at gcc dot gnu dot org
2009-11-12 23:22 ` jason at gcc dot gnu dot org
2009-11-12 23:22 ` jason at gcc dot gnu dot org
2009-11-12 23:27 ` jason 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).