public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [C++ Patch] PR 32113
@ 2007-08-29 12:01 Paolo Carlini
  2007-08-31  3:01 ` Mark Mitchell
  0 siblings, 1 reply; 2+ messages in thread
From: Paolo Carlini @ 2007-08-29 12:01 UTC (permalink / raw)
  To: gcc-patches

[-- Attachment #1: Type: text/plain, Size: 88 bytes --]

Hi,

tested x86_64-linux, Ok for the active branches?

Thanks,
Paolo.

////////////////

[-- Attachment #2: CL_32113 --]
[-- Type: text/plain, Size: 247 bytes --]

/cp
2007-08-29  Paolo Carlini  <pcarlini@suse.de>

	PR c++/32113
	* search.c (lookup_member): Check the name argument for
	error_mark_node.

/testsuite
2007-08-29  Paolo Carlini  <pcarlini@suse.de>

	PR c++/32113
	* g++.dg/template/crash70.C: New.

[-- Attachment #3: patch_32113 --]
[-- Type: text/plain, Size: 907 bytes --]

Index: testsuite/g++.dg/template/crash70.C
===================================================================
*** testsuite/g++.dg/template/crash70.C	(revision 0)
--- testsuite/g++.dg/template/crash70.C	(revision 0)
***************
*** 0 ****
--- 1,7 ----
+ // PR c++/32113
+ 
+ template<int> struct A;
+ 
+ template<typename T> void foo (A<&T::template i>); // { dg-error "not a template" }
+ 
+ template void foo<A<0> > (A<0>); // { dg-error "does not match" }
Index: cp/search.c
===================================================================
*** cp/search.c	(revision 127884)
--- cp/search.c	(working copy)
*************** lookup_member (tree xbasetype, tree name
*** 1199,1204 ****
--- 1199,1207 ----
  
    const char *errstr = 0;
  
+   if (name == error_mark_node)
+     return NULL_TREE;
+ 
    gcc_assert (TREE_CODE (name) == IDENTIFIER_NODE);
  
    if (TREE_CODE (xbasetype) == TREE_BINFO)

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [C++ Patch] PR 32113
  2007-08-29 12:01 [C++ Patch] PR 32113 Paolo Carlini
@ 2007-08-31  3:01 ` Mark Mitchell
  0 siblings, 0 replies; 2+ messages in thread
From: Mark Mitchell @ 2007-08-31  3:01 UTC (permalink / raw)
  To: Paolo Carlini; +Cc: gcc-patches

Paolo Carlini wrote:

> tested x86_64-linux, Ok for the active branches?

/cp
2007-08-29  Paolo Carlini  <pcarlini@suse.de>

	PR c++/32113
	* search.c (lookup_member): Check the name argument for
	error_mark_node.

/testsuite
2007-08-29  Paolo Carlini  <pcarlini@suse.de>

	PR c++/32113
	* g++.dg/template/crash70.C: New.

OK.

-- 
Mark Mitchell
CodeSourcery
mark@codesourcery.com
(650) 331-3385 x713

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-08-31  2:16 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-08-29 12:01 [C++ Patch] PR 32113 Paolo Carlini
2007-08-31  3:01 ` Mark Mitchell

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