PR c++/34180
* method.c (do_build_copy_constructor): Don't drop cv-quals from
the field type.
From-SVN: r153960
2009-11-05 Jason Merrill <jason@redhat.com>
+ PR c++/34180
+ * method.c (do_build_copy_constructor): Don't drop cv-quals from
+ the field type.
+
PR c++/7046
* class.c (finish_struct): Store maximum_field_alignment in
TYPE_PRECISION.
if (DECL_MUTABLE_P (field))
quals &= ~TYPE_QUAL_CONST;
+ quals |= TYPE_QUALS (expr_type);
expr_type = cp_build_qualified_type (expr_type, quals);
}
2009-11-05 Jason Merrill <jason@redhat.com>
+ PR c++/34180
+ * g++.dg/init/synth2.C: New.
+
PR c++/7046
* g++.dg/abi/pragma-pack1.C: New.
--- /dev/null
+// PR c++/34180
+
+struct G {
+ G(); // { dg-message "" "candidate" }
+ G(G&); // { dg-message "" "candidate" }
+};
+
+class A
+{ // { dg-error "no match" }
+ const G g;
+};
+
+int main()
+{
+ A a;
+ A b = a; // { dg-message "required here" }
+}