This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Fix g++.old-deja/g++.oliva/template1.C failure


-- 
--------------------------
SuperH (UK) Ltd.
2410 Aztec West / Almondsbury / BRISTOL / BS32 4QX
T:+44 1454 465658
The dg-error xfail marker in g++.old-deja/g++.oliva/template1.C didn't
work for tree checking builds, as we get an ICE:

/swbuild/nightly/2003-06-03/srcw/gcc/testsuite/g++.old-deja/g++.oliva/template1.C:10: internal compiler error: tree check: expected class 'e', have 'x' (error_mark) in grokdeclarator, at cp/decl.c:10531^M

And it's much nicer just to fix the bug in the first place:


2003-06-04  J"orn Rennecke <joern.rennecke@superh.com>

gcc/cp:
	* decl.c (grokdeclarator): Error_mark_node in, error_mark_node out.

gcc/testsuite/g++.old-deja/g++.oliva:
	* template1.C (bar): Remove xfail marker.

Index: cp/decl.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cp/decl.c,v
retrieving revision 1.1059
diff -p -r1.1059 decl.c
*** cp/decl.c	31 May 2003 12:53:41 -0000	1.1059
--- cp/decl.c	4 Jun 2003 19:44:41 -0000
*************** grokdeclarator (tree declarator,
*** 10527,10532 ****
--- 10527,10534 ----
  	{
  	  if (TREE_CODE (declarator) == SCOPE_REF)
  	    declarator = TREE_OPERAND (declarator, 1);
+ 	  else if (declarator == error_mark_node)
+ 	    return error_mark_node;
  	  else
  	    declarator = TREE_OPERAND (declarator, 0);
  	  continue;
Index: testsuite/g++.old-deja/g++.oliva/template1.C
===================================================================
RCS file: /cvs/gcc/gcc/gcc/testsuite/g++.old-deja/g++.oliva/template1.C,v
retrieving revision 1.3
diff -p -r1.3 template1.C
*** testsuite/g++.old-deja/g++.oliva/template1.C	1 May 2003 02:02:47 -0000	1.3
--- testsuite/g++.old-deja/g++.oliva/template1.C	4 Jun 2003 20:05:48 -0000
*************** template<int P = 0> struct foo {
*** 11,15 ****
  };
  
  void bar() {
!   foo<>::bar(0); // { dg-error "" "" { xfail *-*-* } } instantiated from here
  }
--- 11,15 ----
  };
  
  void bar() {
!   foo<>::bar(0); // { dg-error "" "" } instantiated from here
  }

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]