[Bug c++/44039] [4.5/4.6 regression] ICE: Segmentation fault on error recovery

2010-07-02 Thread paolo at gcc dot gnu dot org


--- 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=gccview=revrev=161698
Log:
/cp
2010-07-02  Paolo Carlini  paolo.carl...@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.carl...@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



[Bug c++/44039] [4.5/4.6 regression] ICE: Segmentation fault on error recovery

2010-07-02 Thread paolo at gcc dot gnu dot org


--- 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=gccview=revrev=161700
Log:
/cp
2010-07-02  Paolo Carlini  paolo.carl...@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.carl...@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



[Bug c++/44039] [4.5/4.6 regression] ICE: Segmentation fault on error recovery

2010-07-02 Thread paolo dot carlini at oracle dot com


--- 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



[Bug c++/44039] [4.5/4.6 regression] ICE: Segmentation fault on error recovery

2010-06-30 Thread jason at gcc dot gnu dot org


--- 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



[Bug c++/44039] [4.5/4.6 regression] ICE: Segmentation fault on error recovery

2010-06-30 Thread jason at gcc dot gnu dot org


--- 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



[Bug c++/44039] [4.5/4.6 regression] ICE: Segmentation fault on error recovery

2010-06-30 Thread paolo dot carlini at oracle dot com


--- 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



[Bug c++/44039] [4.5/4.6 regression] ICE: Segmentation fault on error recovery

2010-06-28 Thread paolo dot carlini at oracle dot com


--- 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 {  };

templateclass charT
  void
  foo()
  { locale::locale(); }

void
bar()
{ foochar(); }


-- 

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



[Bug c++/44039] [4.5/4.6 regression] ICE: Segmentation fault on error recovery

2010-06-28 Thread paolo dot carlini at oracle dot com


--- 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



[Bug c++/44039] [4.5/4.6 regression] ICE: Segmentation fault on error recovery

2010-06-27 Thread paolo dot carlini at oracle dot com


--- 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



[Bug c++/44039] [4.5/4.6 regression] ICE: Segmentation fault on error recovery

2010-05-19 Thread rguenth at gcc dot gnu dot org


--- 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|-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