* [Bug c++/44039] [4.5 regression] ICE: Segmentation fault on error recovery
2010-05-08 14:07 [Bug c++/44039] New: [4.5 regression] ICE: Segmentation fault on error recovery doko at ubuntu dot com
@ 2010-05-08 14:08 ` doko at ubuntu dot com
2010-05-08 14:08 ` doko at ubuntu dot com
` (12 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: doko at ubuntu dot com @ 2010-05-08 14:08 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from doko at ubuntu dot com 2010-05-08 14:08 -------
seen with 4.5 20100506 on x86_64-linux-gnu
--
doko at ubuntu dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
Known to fail| |4.5.0
Known to work| |4.4.4
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44039
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug c++/44039] [4.5 regression] ICE: Segmentation fault on error recovery
2010-05-08 14:07 [Bug c++/44039] New: [4.5 regression] ICE: Segmentation fault on error recovery doko at ubuntu dot com
2010-05-08 14:08 ` [Bug c++/44039] " doko at ubuntu dot com
@ 2010-05-08 14:08 ` doko at ubuntu dot com
2010-05-08 16:41 ` rguenth at gcc dot gnu dot org
` (11 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: doko at ubuntu dot com @ 2010-05-08 14:08 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from doko at ubuntu dot com 2010-05-08 14:07 -------
Created an attachment (id=20602)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=20602&action=view)
preprocessed source
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44039
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug c++/44039] [4.5 regression] ICE: Segmentation fault on error recovery
2010-05-08 14:07 [Bug c++/44039] New: [4.5 regression] ICE: Segmentation fault on error recovery doko at ubuntu dot com
2010-05-08 14:08 ` [Bug c++/44039] " doko at ubuntu dot com
2010-05-08 14:08 ` doko at ubuntu dot com
@ 2010-05-08 16:41 ` rguenth at gcc dot gnu dot org
2010-05-08 18:28 ` paolo dot carlini at oracle dot com
` (10 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2010-05-08 16:41 UTC (permalink / raw)
To: gcc-bugs
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |error-recovery
Target Milestone|--- |4.5.1
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44039
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug c++/44039] [4.5 regression] ICE: Segmentation fault on error recovery
2010-05-08 14:07 [Bug c++/44039] New: [4.5 regression] ICE: Segmentation fault on error recovery doko at ubuntu dot com
` (2 preceding siblings ...)
2010-05-08 16:41 ` rguenth at gcc dot gnu dot org
@ 2010-05-08 18:28 ` paolo dot carlini at oracle dot com
2010-05-19 12:57 ` [Bug c++/44039] [4.5/4.6 " rguenth at gcc dot gnu dot org
` (9 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: paolo dot carlini at oracle dot com @ 2010-05-08 18:28 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from paolo dot carlini at oracle dot com 2010-05-08 18:28 -------
Matthias, can you please reduce to a manageable size these testcases? Thanks in
advance.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44039
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug c++/44039] [4.5/4.6 regression] ICE: Segmentation fault on error recovery
2010-05-08 14:07 [Bug c++/44039] New: [4.5 regression] ICE: Segmentation fault on error recovery doko at ubuntu dot com
` (3 preceding siblings ...)
2010-05-08 18:28 ` paolo dot carlini at oracle dot com
@ 2010-05-19 12:57 ` rguenth at gcc dot gnu dot org
2010-06-27 8:59 ` paolo dot carlini at oracle dot com
` (8 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2010-05-19 12:57 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from rguenth at gcc dot gnu dot org 2010-05-19 12:56 -------
Confirmed.
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Keywords| |ice-on-invalid-code
Priority|P3 |P5
Last reconfirmed|0000-00-00 00:00:00 |2010-05-19 12:56:51
date| |
Summary|[4.5 regression] ICE: |[4.5/4.6 regression] ICE:
|Segmentation fault on error |Segmentation fault on error
|recovery |recovery
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44039
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug c++/44039] [4.5/4.6 regression] ICE: Segmentation fault on error recovery
2010-05-08 14:07 [Bug c++/44039] New: [4.5 regression] ICE: Segmentation fault on error recovery doko at ubuntu dot com
` (4 preceding siblings ...)
2010-05-19 12:57 ` [Bug c++/44039] [4.5/4.6 " rguenth at gcc dot gnu dot org
@ 2010-06-27 8:59 ` paolo dot carlini at oracle dot com
2010-06-28 13:08 ` paolo dot carlini at oracle dot com
` (7 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: paolo dot carlini at oracle dot com @ 2010-06-27 8:59 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from paolo dot carlini at oracle dot com 2010-06-27 08:59 -------
Reducing...
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44039
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug c++/44039] [4.5/4.6 regression] ICE: Segmentation fault on error recovery
2010-05-08 14:07 [Bug c++/44039] New: [4.5 regression] ICE: Segmentation fault on error recovery doko at ubuntu dot com
` (5 preceding siblings ...)
2010-06-27 8:59 ` paolo dot carlini at oracle dot com
@ 2010-06-28 13:08 ` paolo dot carlini at oracle dot com
2010-06-28 15:20 ` paolo dot carlini at oracle dot com
` (6 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: paolo dot carlini at oracle dot com @ 2010-06-28 13:08 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from paolo dot carlini at oracle dot com 2010-06-28 13:08 -------
I'm still working on this, but this kind of situation is certainly part of the
problem, if not all of it, it ICES.
Jason, does it look familiar to you? I'm asking because I think you implemented
the recent changes to reject locale::locale() below...
////////////////
struct locale { };
template<class charT>
void
foo()
{ locale::locale(); }
void
bar()
{ foo<char>(); }
--
paolo dot carlini at oracle dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |paolo dot carlini at oracle
| |dot com, jason at gcc dot
| |gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44039
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug c++/44039] [4.5/4.6 regression] ICE: Segmentation fault on error recovery
2010-05-08 14:07 [Bug c++/44039] New: [4.5 regression] ICE: Segmentation fault on error recovery doko at ubuntu dot com
` (6 preceding siblings ...)
2010-06-28 13:08 ` paolo dot carlini at oracle dot com
@ 2010-06-28 15:20 ` paolo dot carlini at oracle dot com
2010-06-30 18:28 ` jason at gcc dot gnu dot org
` (5 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: paolo dot carlini at oracle dot com @ 2010-06-28 15:20 UTC (permalink / raw)
To: gcc-bugs
------- Comment #7 from paolo dot carlini at oracle dot com 2010-06-28 15:20 -------
I'm now pretty sure that the issue with locale::locale() is all there is to
this PR. I also checked that the below patchlet avoids the ICE both for the
original testcase and my snippet (it also passes the testsuite, but I'm not
sure whether we could catch the problem earlier):
Index: pt.c
===================================================================
--- pt.c (revision 161491)
+++ pt.c (working copy)
@@ -10695,6 +10695,8 @@ tsubst_baselink (tree baselink, tree object_type,
if (IDENTIFIER_TYPENAME_P (name))
name = mangle_conv_op_name_for_type (optype);
baselink = lookup_fnfields (qualifying_scope, name, /*protect=*/1);
+ if (!baselink)
+ return error_mark_node;
/* If lookup found a single function, mark it as used at this
point. (If it lookup found multiple functions the one selected
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44039
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug c++/44039] [4.5/4.6 regression] ICE: Segmentation fault on error recovery
2010-05-08 14:07 [Bug c++/44039] New: [4.5 regression] ICE: Segmentation fault on error recovery doko at ubuntu dot com
` (7 preceding siblings ...)
2010-06-28 15:20 ` paolo dot carlini at oracle dot com
@ 2010-06-30 18:28 ` jason at gcc dot gnu dot org
2010-06-30 18:28 ` jason at gcc dot gnu dot org
` (4 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: jason at gcc dot gnu dot org @ 2010-06-30 18:28 UTC (permalink / raw)
To: gcc-bugs
------- Comment #9 from jason at gcc dot gnu dot org 2010-06-30 18:28 -------
*** Bug 44040 has been marked as a duplicate of this bug. ***
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44039
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug c++/44039] [4.5/4.6 regression] ICE: Segmentation fault on error recovery
2010-05-08 14:07 [Bug c++/44039] New: [4.5 regression] ICE: Segmentation fault on error recovery doko at ubuntu dot com
` (8 preceding siblings ...)
2010-06-30 18:28 ` jason at gcc dot gnu dot org
@ 2010-06-30 18:28 ` jason at gcc dot gnu dot org
2010-06-30 18:43 ` paolo dot carlini at oracle dot com
` (3 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: jason at gcc dot gnu dot org @ 2010-06-30 18:28 UTC (permalink / raw)
To: gcc-bugs
------- Comment #8 from jason at gcc dot gnu dot org 2010-06-30 18:27 -------
That patch is OK, it's reasonable for lookup_fnfields to return NULL.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44039
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug c++/44039] [4.5/4.6 regression] ICE: Segmentation fault on error recovery
2010-05-08 14:07 [Bug c++/44039] New: [4.5 regression] ICE: Segmentation fault on error recovery doko at ubuntu dot com
` (9 preceding siblings ...)
2010-06-30 18:28 ` jason at gcc dot gnu dot org
@ 2010-06-30 18:43 ` paolo dot carlini at oracle dot com
2010-07-02 10:13 ` paolo at gcc dot gnu dot org
` (2 subsequent siblings)
13 siblings, 0 replies; 15+ messages in thread
From: paolo dot carlini at oracle dot com @ 2010-06-30 18:43 UTC (permalink / raw)
To: gcc-bugs
------- Comment #10 from paolo dot carlini at oracle dot com 2010-06-30 18:43 -------
Thanks Jason, I'll add the testcase, regtest again and post before committing.
--
paolo dot carlini at oracle dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |paolo dot carlini at oracle
|dot org |dot com
Status|NEW |ASSIGNED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44039
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug c++/44039] [4.5/4.6 regression] ICE: Segmentation fault on error recovery
2010-05-08 14:07 [Bug c++/44039] New: [4.5 regression] ICE: Segmentation fault on error recovery doko at ubuntu dot com
` (10 preceding siblings ...)
2010-06-30 18:43 ` paolo dot carlini at oracle dot com
@ 2010-07-02 10:13 ` paolo at gcc dot gnu dot org
2010-07-02 10:15 ` paolo at gcc dot gnu dot org
2010-07-02 10:17 ` paolo dot carlini at oracle dot com
13 siblings, 0 replies; 15+ messages in thread
From: paolo at gcc dot gnu dot org @ 2010-07-02 10:13 UTC (permalink / raw)
To: gcc-bugs
------- Comment #11 from paolo at gcc dot gnu dot org 2010-07-02 10:13 -------
Subject: Bug 44039
Author: paolo
Date: Fri Jul 2 10:13:21 2010
New Revision: 161698
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=161698
Log:
/cp
2010-07-02 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/44039
* pt.c (tsubst_baselink): Return error_mark_node if lookup_fnfields
returns NULL_TREE.
/testsuite
2010-07-02 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/44039
* g++.dg/template/crash101.C: New.
Added:
trunk/gcc/testsuite/g++.dg/template/crash101.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/pt.c
trunk/gcc/testsuite/ChangeLog
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44039
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug c++/44039] [4.5/4.6 regression] ICE: Segmentation fault on error recovery
2010-05-08 14:07 [Bug c++/44039] New: [4.5 regression] ICE: Segmentation fault on error recovery doko at ubuntu dot com
` (11 preceding siblings ...)
2010-07-02 10:13 ` paolo at gcc dot gnu dot org
@ 2010-07-02 10:15 ` paolo at gcc dot gnu dot org
2010-07-02 10:17 ` paolo dot carlini at oracle dot com
13 siblings, 0 replies; 15+ messages in thread
From: paolo at gcc dot gnu dot org @ 2010-07-02 10:15 UTC (permalink / raw)
To: gcc-bugs
------- Comment #12 from paolo at gcc dot gnu dot org 2010-07-02 10:15 -------
Subject: Bug 44039
Author: paolo
Date: Fri Jul 2 10:15:10 2010
New Revision: 161700
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=161700
Log:
/cp
2010-07-02 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/44039
* pt.c (tsubst_baselink): Return error_mark_node if lookup_fnfields
returns NULL_TREE.
/testsuite
2010-07-02 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/44039
* g++.dg/template/crash98.C: New.
Added:
branches/gcc-4_5-branch/gcc/testsuite/g++.dg/template/crash98.C
Modified:
branches/gcc-4_5-branch/gcc/cp/ChangeLog
branches/gcc-4_5-branch/gcc/cp/pt.c
branches/gcc-4_5-branch/gcc/testsuite/ChangeLog
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44039
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Bug c++/44039] [4.5/4.6 regression] ICE: Segmentation fault on error recovery
2010-05-08 14:07 [Bug c++/44039] New: [4.5 regression] ICE: Segmentation fault on error recovery doko at ubuntu dot com
` (12 preceding siblings ...)
2010-07-02 10:15 ` paolo at gcc dot gnu dot org
@ 2010-07-02 10:17 ` paolo dot carlini at oracle dot com
13 siblings, 0 replies; 15+ messages in thread
From: paolo dot carlini at oracle dot com @ 2010-07-02 10:17 UTC (permalink / raw)
To: gcc-bugs
------- Comment #13 from paolo dot carlini at oracle dot com 2010-07-02 10:17 -------
Fixed for 4.5.1.
--
paolo dot carlini at oracle dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44039
^ permalink raw reply [flat|nested] 15+ messages in thread