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]

C++ PATCH: Fix PR7524


This patch fixes PR7524, a regression from GCC 2.95.3.

Tested on i686-pc-linux-gnu, applied on the mainline and on the branch.

-- 
Mark Mitchell                   mark@codesourcery.com
CodeSourcery, LLC               http://www.codesourcery.com

2002-10-16  Mark Mitchell  <mark@codesourcery.com>

	PR c++/7524
	* method.c (do_build_assign_ref): Use cp_build_qualified_type, not
	build_qualified_type.

2002-10-16  Mark Mitchell  <mark@codesourcery.com>

	PR c++/7524
	* g++.dg/init/array7.C: New test.

Index: cp/method.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cp/method.c,v
retrieving revision 1.219.2.4
diff -c -p -r1.219.2.4 method.c
*** cp/method.c	29 Apr 2002 14:54:52 -0000	1.219.2.4
--- cp/method.c	16 Oct 2002 18:46:58 -0000
*************** do_build_assign_ref (fndecl)
*** 688,694 ****
  
  	  comp = build (COMPONENT_REF, TREE_TYPE (field), comp, field);
  	  init = build (COMPONENT_REF,
! 	                build_qualified_type (TREE_TYPE (field), cvquals),
  	                init, field);
  
  	  if (DECL_NAME (field))
--- 688,694 ----
  
  	  comp = build (COMPONENT_REF, TREE_TYPE (field), comp, field);
  	  init = build (COMPONENT_REF,
! 	                cp_build_qualified_type (TREE_TYPE (field), cvquals),
  	                init, field);
  
  	  if (DECL_NAME (field))
Index: testsuite/g++.dg/init/array7.C
===================================================================
RCS file: testsuite/g++.dg/init/array7.C
diff -N testsuite/g++.dg/init/array7.C
*** /dev/null	1 Jan 1970 00:00:00 -0000
--- testsuite/g++.dg/init/array7.C	16 Oct 2002 18:46:58 -0000
***************
*** 0 ****
--- 1,15 ----
+ struct S {
+   virtual void v () {}
+   void f (const float g[3]);
+   float h[3];
+ };
+ 
+ void g () {
+   S s1, s2;
+   s1 = s2;
+ }
+ 
+ void S::f (const float g[3]) {}
+ 
+ 
+ 


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