PR middle-end/32912
* fold-const.c (fold_binary): Only optimize X | ~X and X ^ ~X for
integral types.
* gcc.dg/pr32912-1.c: New test.
* gcc.dg/pr32912-2.c: New test.
From-SVN: r127781
+2007-08-24 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/31941
+ * error.c (resolve_virtual_fun_from_obj_type_ref): Handle
+ TARGET_VTABLE_USES_DESCRIPTORS targets properly.
+
2007-08-20 Jakub Jelinek <jakub@redhat.com>
PR c++/32992
resolve_virtual_fun_from_obj_type_ref (tree ref)
{
tree obj_type = TREE_TYPE (OBJ_TYPE_REF_OBJECT (ref));
- int index = tree_low_cst (OBJ_TYPE_REF_TOKEN (ref), 1);
+ HOST_WIDE_INT index = tree_low_cst (OBJ_TYPE_REF_TOKEN (ref), 1);
tree fun = BINFO_VIRTUALS (TYPE_BINFO (TREE_TYPE (obj_type)));
- while (index--)
+ while (index)
+ {
fun = TREE_CHAIN (fun);
+ index -= (TARGET_VTABLE_USES_DESCRIPTORS
+ ? TARGET_VTABLE_USES_DESCRIPTORS : 1);
+ }
return BV_FN (fun);
}
+2007-08-24 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/31941
+ * g++.dg/parse/crash37.C: New test.
+
2007-08-22 Richard Guenther <rguenther@suse.de>
PR tree-optimization/33142
--- /dev/null
+// PR c++/31941
+// { dg-do compile }
+
+struct S
+{
+ S() throw () { }
+ virtual ~S () throw ();
+ virtual const char* what () const throw ();
+};
+
+const char *
+foo (S &e)
+{
+ return e.what ().c_str (); // { dg-error "c_str.*S::what.*which is of non-class type" }
+}