OSDN Git Service

PR c++/7524
authormmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 16 Oct 2002 18:58:38 +0000 (18:58 +0000)
committermmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 16 Oct 2002 18:58:38 +0000 (18:58 +0000)
* g++.dg/init/array7.C: New test.

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

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@58217 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/cp/ChangeLog
gcc/cp/method.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/init/array7.C [new file with mode: 0644]

index a3ef2da..07b8732 100644 (file)
@@ -1,3 +1,9 @@
+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-15  Richard Henderson  <rth@redhat.com>
 
        * error.c (dump_expr): Use real_to_decimal directly, and with
index 0658181..6f3e0e7 100644 (file)
@@ -705,7 +705,7 @@ do_build_assign_ref (fndecl)
 
          comp = build (COMPONENT_REF, TREE_TYPE (field), comp, field);
          init = build (COMPONENT_REF,
-                       build_qualified_type (TREE_TYPE (field), cvquals),
+                       cp_build_qualified_type (TREE_TYPE (field), cvquals),
                        init, field);
 
          if (DECL_NAME (field))
index 50f478f..9f88588 100644 (file)
@@ -1,3 +1,8 @@
+2002-10-16  Mark Mitchell  <mark@codesourcery.com>
+
+       PR c++/7524
+       * g++.dg/init/array7.C: New test.
+
 2002-10-15  Mark Mitchell  <mark@codesourcery.com>
 
        * g++.dg/init/array6.C: New test.
diff --git a/gcc/testsuite/g++.dg/init/array7.C b/gcc/testsuite/g++.dg/init/array7.C
new file mode 100644 (file)
index 0000000..23c6a70
--- /dev/null
@@ -0,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]) {}
+
+
+