public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/35405] New: Internal compiler error
@ 2008-02-29 0:31 carlo at gcc dot gnu dot org
2008-02-29 12:49 ` [Bug c++/35405] [4.2/4.3/4.4 Regression] " rguenth at gcc dot gnu dot org
` (11 more replies)
0 siblings, 12 replies; 13+ messages in thread
From: carlo at gcc dot gnu dot org @ 2008-02-29 0:31 UTC (permalink / raw)
To: gcc-bugs
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1498 bytes --]
~>g++-svn-4.3 troep.cc
troep.cc: In instantiation of âcheck<int, Saveable>â:
troep.cc:38: instantiated from here
troep.cc:14: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
All 3.x (that I have installed) and all 4.x versions ice on this.
Content of troep.cc:
typedef char no;
typedef char (&yes)[2];
template <typename T, template <typename> class Concept>
struct check
{
template <int H>
struct hint;
template <typename U>
static no test(...);
template <template <typename> class C, typename X, C<X>* = 0>
struct helper
{
typedef yes type;
};
template <typename U>
static typename helper<Concept, U>::type test(U* t);
static bool const value = (sizeof(check::template test<T>(0)) ==
sizeof(yes));
};
template <typename C, typename T, T C::* P>
struct member
{
typedef T type;
};
template <typename T>
struct Saveable : member<T, void(), &T::save>
{
};
int main()
{
check<int, Saveable>::value;
}
--
Summary: Internal compiler error
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: carlo at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35405
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/35405] [4.2/4.3/4.4 Regression] Internal compiler error
2008-02-29 0:31 [Bug c++/35405] New: Internal compiler error carlo at gcc dot gnu dot org
@ 2008-02-29 12:49 ` rguenth at gcc dot gnu dot org
2008-03-04 0:58 ` pinskia at gcc dot gnu dot org
` (10 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2008-02-29 12:49 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from rguenth at gcc dot gnu dot org 2008-02-29 12:48 -------
t.C(13): error #501: argument of type "int" is incompatible with template
parameter of type "C<X> *"
template <template <typename> class C, typename X, C<X>* = 0>
^
2.95.4 rejects this with
t.C: In instantiation of `check<int,Saveable>':
t.C:39: instantiated from here
t.C:39: `C' is not a template
t.C:15: `C' is not a template
t.C:23: no method `check<int,Saveable>::test<int>'
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Keywords| |ice-on-invalid-code
Known to fail| |3.3.6
Known to work| |2.95.4
Priority|P3 |P2
Last reconfirmed|0000-00-00 00:00:00 |2008-02-29 12:48:25
date| |
Summary|Internal compiler error |[4.2/4.3/4.4 Regression]
| |Internal compiler error
Target Milestone|--- |4.2.4
Version|unknown |4.3.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35405
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/35405] [4.2/4.3/4.4 Regression] Internal compiler error
2008-02-29 0:31 [Bug c++/35405] New: Internal compiler error carlo at gcc dot gnu dot org
2008-02-29 12:49 ` [Bug c++/35405] [4.2/4.3/4.4 Regression] " rguenth at gcc dot gnu dot org
@ 2008-03-04 0:58 ` pinskia at gcc dot gnu dot org
2008-03-04 1:20 ` mrs at apple dot com
` (9 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2008-03-04 0:58 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from pinskia at gcc dot gnu dot org 2008-03-04 00:58 -------
*** Bug 35450 has been marked as a duplicate of this bug. ***
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |mrs at apple dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35405
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/35405] [4.2/4.3/4.4 Regression] Internal compiler error
2008-02-29 0:31 [Bug c++/35405] New: Internal compiler error carlo at gcc dot gnu dot org
2008-02-29 12:49 ` [Bug c++/35405] [4.2/4.3/4.4 Regression] " rguenth at gcc dot gnu dot org
2008-03-04 0:58 ` pinskia at gcc dot gnu dot org
@ 2008-03-04 1:20 ` mrs at apple dot com
2008-05-19 20:47 ` jsm28 at gcc dot gnu dot org
` (8 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: mrs at apple dot com @ 2008-03-04 1:20 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from mrs at apple dot com 2008-03-04 01:19 -------
My bug is related to this, but mine is an ice on valid.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35405
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/35405] [4.2/4.3/4.4 Regression] Internal compiler error
2008-02-29 0:31 [Bug c++/35405] New: Internal compiler error carlo at gcc dot gnu dot org
` (2 preceding siblings ...)
2008-03-04 1:20 ` mrs at apple dot com
@ 2008-05-19 20:47 ` jsm28 at gcc dot gnu dot org
2008-08-13 12:58 ` dodji at gcc dot gnu dot org
` (7 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: jsm28 at gcc dot gnu dot org @ 2008-05-19 20:47 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from jsm28 at gcc dot gnu dot org 2008-05-19 20:25 -------
4.2.4 is being released, changing milestones to 4.2.5.
--
jsm28 at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|4.2.4 |4.2.5
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35405
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/35405] [4.2/4.3/4.4 Regression] Internal compiler error
2008-02-29 0:31 [Bug c++/35405] New: Internal compiler error carlo at gcc dot gnu dot org
` (3 preceding siblings ...)
2008-05-19 20:47 ` jsm28 at gcc dot gnu dot org
@ 2008-08-13 12:58 ` dodji at gcc dot gnu dot org
2008-08-13 15:44 ` dodji at gcc dot gnu dot org
` (6 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: dodji at gcc dot gnu dot org @ 2008-08-13 12:58 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from dodji at gcc dot gnu dot org 2008-08-13 12:57 -------
A simpler reproducer is:
1 template<typename T>
2 struct a
3 {
4 template <template <typename> class C, typename X, C<X>* =0>
5 struct b
6 {
7 };
8 };
9
10 void
11 foo ()
12 {
13 a<int> v;
14 }
gcc spits the following error:
void foo()
test.cc: At global scope:
test.cc: In instantiation of 'a<int>':
test.cc:13: instantiated from here
test.cc:5: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
--
dodji at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |dodji at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35405
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/35405] [4.2/4.3/4.4 Regression] Internal compiler error
2008-02-29 0:31 [Bug c++/35405] New: Internal compiler error carlo at gcc dot gnu dot org
` (4 preceding siblings ...)
2008-08-13 12:58 ` dodji at gcc dot gnu dot org
@ 2008-08-13 15:44 ` dodji at gcc dot gnu dot org
2008-11-18 12:57 ` dodji at gcc dot gnu dot org
` (5 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: dodji at gcc dot gnu dot org @ 2008-08-13 15:44 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from dodji at gcc dot gnu dot org 2008-08-13 15:42 -------
Created an attachment (id=16066)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=16066&action=view)
first fix candidate
This patch is an obvious fix to the ICE.
Now the compiler reports the following (not nice) error:
crash79.C: In
instantiation of 'a<int>':
crash79.C:16:
instantiated from here
crash79.C:8:<
error: 'template<class> class C' is not a template
crash79.C:8:
error: '<type error>' is not a valid type for a template constant
parameter
crash79.C:8:
error: 'template<class> class C' is not a template
crash79.C:8:
error: '<type error>' is not a valid type for a template constant
parameter
We could try and fix this to make the compiler display a nicer error.
In the mean time, if this fix is okay to fix the ICE only, I could try to
submit to gcc-patches.
Comment anyone ?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35405
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/35405] [4.2/4.3/4.4 Regression] Internal compiler error
2008-02-29 0:31 [Bug c++/35405] New: Internal compiler error carlo at gcc dot gnu dot org
` (5 preceding siblings ...)
2008-08-13 15:44 ` dodji at gcc dot gnu dot org
@ 2008-11-18 12:57 ` dodji at gcc dot gnu dot org
2008-11-18 12:58 ` dodji at gcc dot gnu dot org
` (4 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: dodji at gcc dot gnu dot org @ 2008-11-18 12:57 UTC (permalink / raw)
To: gcc-bugs
--
dodji at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |dodji at gcc dot gnu dot org
|dot org |
Status|NEW |ASSIGNED
Last reconfirmed|2008-02-29 12:48:25 |2008-11-18 12:56:02
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35405
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/35405] [4.2/4.3/4.4 Regression] Internal compiler error
2008-02-29 0:31 [Bug c++/35405] New: Internal compiler error carlo at gcc dot gnu dot org
` (6 preceding siblings ...)
2008-11-18 12:57 ` dodji at gcc dot gnu dot org
@ 2008-11-18 12:58 ` dodji at gcc dot gnu dot org
2008-11-19 22:29 ` dodji at gcc dot gnu dot org
` (3 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: dodji at gcc dot gnu dot org @ 2008-11-18 12:58 UTC (permalink / raw)
To: gcc-bugs
------- Comment #7 from dodji at gcc dot gnu dot org 2008-11-18 12:57 -------
Okay, patch updated and sent to
http://gcc.gnu.org/ml/gcc-patches/2008-11/msg00873.html.
Fingers crossed.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35405
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/35405] [4.2/4.3/4.4 Regression] Internal compiler error
2008-02-29 0:31 [Bug c++/35405] New: Internal compiler error carlo at gcc dot gnu dot org
` (7 preceding siblings ...)
2008-11-18 12:58 ` dodji at gcc dot gnu dot org
@ 2008-11-19 22:29 ` dodji at gcc dot gnu dot org
2008-11-19 22:39 ` dodji at gcc dot gnu dot org
` (2 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: dodji at gcc dot gnu dot org @ 2008-11-19 22:29 UTC (permalink / raw)
To: gcc-bugs
------- Comment #8 from dodji at gcc dot gnu dot org 2008-11-19 22:28 -------
Subject: Bug 35405
Author: dodji
Date: Wed Nov 19 22:26:56 2008
New Revision: 142022
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=142022
Log:
gcc/cp/ChangeLog:
2008-11-19 Dodji Seketeli <dodji@redhat.com>
PR c++/35405
* pt.c (lookup_template_class): Check pointers before dereferencing
Them.
* error.c (dump_template_decl): Likewise.
gcc/testsuite/ChangeLog:
2008-11-19 Dodji Seketeli <dodji@redhat.com>
PR c++/35405
* g++.dg/template/crash84.C: New test.
Added:
trunk/gcc/testsuite/g++.dg/template/crash84.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/error.c
trunk/gcc/cp/pt.c
trunk/gcc/testsuite/ChangeLog
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35405
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/35405] [4.2/4.3/4.4 Regression] Internal compiler error
2008-02-29 0:31 [Bug c++/35405] New: Internal compiler error carlo at gcc dot gnu dot org
` (8 preceding siblings ...)
2008-11-19 22:29 ` dodji at gcc dot gnu dot org
@ 2008-11-19 22:39 ` dodji at gcc dot gnu dot org
2008-11-19 22:50 ` dodji at gcc dot gnu dot org
2009-04-29 15:20 ` pinskia at gcc dot gnu dot org
11 siblings, 0 replies; 13+ messages in thread
From: dodji at gcc dot gnu dot org @ 2008-11-19 22:39 UTC (permalink / raw)
To: gcc-bugs
------- Comment #9 from dodji at gcc dot gnu dot org 2008-11-19 22:37 -------
Subject: Bug 35405
Author: dodji
Date: Wed Nov 19 22:36:31 2008
New Revision: 142023
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=142023
Log:
gcc/cp/ChangeLog:
2008-11-18 Dodji Seketeli <dodji@redhat.com>
PR c++/35405
* pt.c (lookup_template_class): Check pointers before dereferencing
Them.
* error.c (dump_template_decl): Likewise.
gcc/testsuite/ChangeLog
2008-11-19 Dodji Seketeli <dodji@redhat.com>
PR c++/35405
* g++.dg/template/crash84.C: New test.
Added:
branches/gcc-4_3-branch/gcc/testsuite/g++.dg/template/crash84.C
Modified:
branches/gcc-4_3-branch/gcc/cp/ChangeLog
branches/gcc-4_3-branch/gcc/cp/error.c
branches/gcc-4_3-branch/gcc/cp/pt.c
branches/gcc-4_3-branch/gcc/testsuite/ChangeLog
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35405
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/35405] [4.2/4.3/4.4 Regression] Internal compiler error
2008-02-29 0:31 [Bug c++/35405] New: Internal compiler error carlo at gcc dot gnu dot org
` (9 preceding siblings ...)
2008-11-19 22:39 ` dodji at gcc dot gnu dot org
@ 2008-11-19 22:50 ` dodji at gcc dot gnu dot org
2009-04-29 15:20 ` pinskia at gcc dot gnu dot org
11 siblings, 0 replies; 13+ messages in thread
From: dodji at gcc dot gnu dot org @ 2008-11-19 22:50 UTC (permalink / raw)
To: gcc-bugs
------- Comment #10 from dodji at gcc dot gnu dot org 2008-11-19 22:49 -------
Fixed in trunk and gcc-4_3-branch.
--
dodji at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35405
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug c++/35405] [4.2/4.3/4.4 Regression] Internal compiler error
2008-02-29 0:31 [Bug c++/35405] New: Internal compiler error carlo at gcc dot gnu dot org
` (10 preceding siblings ...)
2008-11-19 22:50 ` dodji at gcc dot gnu dot org
@ 2009-04-29 15:20 ` pinskia at gcc dot gnu dot org
11 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2009-04-29 15:20 UTC (permalink / raw)
To: gcc-bugs
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|4.2.5 |4.3.3
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35405
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2009-04-29 15:20 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-02-29 0:31 [Bug c++/35405] New: Internal compiler error carlo at gcc dot gnu dot org
2008-02-29 12:49 ` [Bug c++/35405] [4.2/4.3/4.4 Regression] " rguenth at gcc dot gnu dot org
2008-03-04 0:58 ` pinskia at gcc dot gnu dot org
2008-03-04 1:20 ` mrs at apple dot com
2008-05-19 20:47 ` jsm28 at gcc dot gnu dot org
2008-08-13 12:58 ` dodji at gcc dot gnu dot org
2008-08-13 15:44 ` dodji at gcc dot gnu dot org
2008-11-18 12:57 ` dodji at gcc dot gnu dot org
2008-11-18 12:58 ` dodji at gcc dot gnu dot org
2008-11-19 22:29 ` dodji at gcc dot gnu dot org
2008-11-19 22:39 ` dodji at gcc dot gnu dot org
2008-11-19 22:50 ` dodji at gcc dot gnu dot org
2009-04-29 15:20 ` 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).