public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/12932] New: segfault compiling tempalte instantiation
@ 2003-11-06 22:42 cxl at ntllib dot org
2003-11-06 22:56 ` [Bug c++/12932] [3.4 regression] ICE with use of ptr-to-function as template arg bangerth at dealii dot org
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: cxl at ntllib dot org @ 2003-11-06 22:42 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12932
Summary: segfault compiling tempalte instantiation
Product: gcc
Version: 3.4
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: cxl at ntllib dot org
CC: gcc-bugs at gcc dot gnu dot org
class EmptyClass {};
template <class T, int (*compare)(T a, T b), class B = EmptyClass>
class CompareRelOps : B
{
public:
friend bool operator < (T a, T b) { return (*compare)(a, b) < 0; }
};
struct Test
{
static int compare(const Test& a, const Test& b);
};
template class CompareRelOps<const Test&, Test::compare>;
int main()
{
Test a, b;
a < b;
return 0;
}
------
GCC version: gcc (GCC) 3.4 20031006 (experimental)
build MingW
command-line
c++ -c -ggdb -g2 -D_DEBUG -O0 -x c++ -I"f:/uppdev" -I"f:/uppsrc"
-I"G:/mingw2/i386-mingw32/include" -I"f:/uppsrc" -I"f:/uppsrc/platform" -I"e:/v/in
clude" -I"d:/ORANT/OCI80/INCLUDE" -I"d:/mysql/include" -DflagCONSOLE -DflagST
-DflagSTATIC -DflagMAIN -DflagWIN32 -DflagGNU -DflagIA32 -DflagDE
BUG f:/uppdev/TestGCC/main.cpp -o
output:
e:/out/upp/TestGCC/CONSOLE-DEBUG-GNU-IA32-MAIN-ST-STATIC-WIN32/main.o
f:/uppdev/TestGCC/main.cpp: In function `bool operator<(const Test&, const Test&)':
f:/uppdev/TestGCC/main.cpp:35: instantiated from here
f:/uppdev/TestGCC/main.cpp:17: internal compiler error: Segmentation fault
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/12932] [3.4 regression] ICE with use of ptr-to-function as template arg
2003-11-06 22:42 [Bug c++/12932] New: segfault compiling tempalte instantiation cxl at ntllib dot org
@ 2003-11-06 22:56 ` bangerth at dealii dot org
2003-11-06 23:52 ` pinskia at gcc dot gnu dot org
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: bangerth at dealii dot org @ 2003-11-06 22:56 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12932
bangerth at dealii dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
Keywords| |ice-on-valid-code
Last reconfirmed|0000-00-00 00:00:00 |2003-11-06 22:56:52
date| |
Summary|segfault compiling tempalte|[3.4 regression] ICE with
|instantiation |use of ptr-to-function as
| |template arg
Target Milestone|--- |3.4
------- Additional Comments From bangerth at dealii dot org 2003-11-06 22:56 -------
Confirmed. Here's something smaller:
---------------------
struct Test {
static void fun();
};
template <void (*fun)()>
void foo () { (*fun)(); }
template
void foo<Test::fun> ();
-------------------------------
This is a regression on mainline w.r.t. all previous versions.
W.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/12932] [3.4 regression] ICE with use of ptr-to-function as template arg
2003-11-06 22:42 [Bug c++/12932] New: segfault compiling tempalte instantiation cxl at ntllib dot org
2003-11-06 22:56 ` [Bug c++/12932] [3.4 regression] ICE with use of ptr-to-function as template arg bangerth at dealii dot org
@ 2003-11-06 23:52 ` pinskia at gcc dot gnu dot org
2003-11-17 14:30 ` lerdsuwa at gcc dot gnu dot org
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2003-11-06 23:52 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12932
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Severity|normal |critical
------- Additional Comments From pinskia at gcc dot gnu dot org 2003-11-06 23:52 -------
>From Phil's regression hunter: Search converges between 2002-12-27-trunk (#177) and 2002-12
-28-trunk (#178).
Looks like when the new parser went in. :(
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/12932] [3.4 regression] ICE with use of ptr-to-function as template arg
2003-11-06 22:42 [Bug c++/12932] New: segfault compiling tempalte instantiation cxl at ntllib dot org
2003-11-06 22:56 ` [Bug c++/12932] [3.4 regression] ICE with use of ptr-to-function as template arg bangerth at dealii dot org
2003-11-06 23:52 ` pinskia at gcc dot gnu dot org
@ 2003-11-17 14:30 ` lerdsuwa at gcc dot gnu dot org
2003-11-18 15:54 ` lerdsuwa at gcc dot gnu dot org
2003-11-18 15:54 ` cvs-commit at gcc dot gnu dot org
4 siblings, 0 replies; 6+ messages in thread
From: lerdsuwa at gcc dot gnu dot org @ 2003-11-17 14:30 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From lerdsuwa at gcc dot gnu dot org 2003-11-17 14:30 -------
Will look at it.
--
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |lerdsuwa at gcc dot gnu dot
|dot org |org
Status|NEW |ASSIGNED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12932
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/12932] [3.4 regression] ICE with use of ptr-to-function as template arg
2003-11-06 22:42 [Bug c++/12932] New: segfault compiling tempalte instantiation cxl at ntllib dot org
` (3 preceding siblings ...)
2003-11-18 15:54 ` lerdsuwa at gcc dot gnu dot org
@ 2003-11-18 15:54 ` cvs-commit at gcc dot gnu dot org
4 siblings, 0 replies; 6+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2003-11-18 15:54 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2003-11-18 15:54 -------
Subject: Bug 12932
CVSROOT: /cvs/gcc
Module name: gcc
Changes by: lerdsuwa@gcc.gnu.org 2003-11-18 15:54:22
Modified files:
gcc/cp : ChangeLog class.c cp-tree.h semantics.c
gcc/testsuite : ChangeLog
Added files:
gcc/testsuite/g++.dg/template: static5.C
Log message:
PR c++/12932
* class.c (currently_open_derived_class): Check if
current_class_type is NULL_TREE.
* semantics.c (finish_call_expr): Check if
currently_open_derived_class returns NULL_TREE.
* cp-tree.h (DERIVED_FROM_P): Add parenthesis around PARENT
parameter.
* g++.dg/template/static5.C: New test.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcc&r1=1.3765&r2=1.3766
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/class.c.diff?cvsroot=gcc&r1=1.582&r2=1.583
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/cp-tree.h.diff?cvsroot=gcc&r1=1.932&r2=1.933
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/semantics.c.diff?cvsroot=gcc&r1=1.372&r2=1.373
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.3197&r2=1.3198
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/template/static5.C.diff?cvsroot=gcc&r1=NONE&r2=1.1
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12932
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/12932] [3.4 regression] ICE with use of ptr-to-function as template arg
2003-11-06 22:42 [Bug c++/12932] New: segfault compiling tempalte instantiation cxl at ntllib dot org
` (2 preceding siblings ...)
2003-11-17 14:30 ` lerdsuwa at gcc dot gnu dot org
@ 2003-11-18 15:54 ` lerdsuwa at gcc dot gnu dot org
2003-11-18 15:54 ` cvs-commit at gcc dot gnu dot org
4 siblings, 0 replies; 6+ messages in thread
From: lerdsuwa at gcc dot gnu dot org @ 2003-11-18 15:54 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From lerdsuwa at gcc dot gnu dot org 2003-11-18 15:54 -------
Fixed in the mainline.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12932
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2003-11-18 15:54 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-11-06 22:42 [Bug c++/12932] New: segfault compiling tempalte instantiation cxl at ntllib dot org
2003-11-06 22:56 ` [Bug c++/12932] [3.4 regression] ICE with use of ptr-to-function as template arg bangerth at dealii dot org
2003-11-06 23:52 ` pinskia at gcc dot gnu dot org
2003-11-17 14:30 ` lerdsuwa at gcc dot gnu dot org
2003-11-18 15:54 ` lerdsuwa at gcc dot gnu dot org
2003-11-18 15:54 ` cvs-commit 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).