2019-04-25 Richard Biener <rguenther@suse.de>
PR middle-end/90194
* match.pd: Add pattern to simplify view-conversion of an
empty constructor.
* g++.dg/torture/pr90194.C: New testcase.
From-SVN: r270569
+2019-04-25 Richard Biener <rguenther@suse.de>
+
+ PR middle-end/90194
+ * match.pd: Add pattern to simplify view-conversion of an
+ empty constructor.
+
2019-04-24 Clement Chigot <clement.chigot@atos.net>
* config/rs6000/aix71.h (SUBTARGET_OVERRIDE_OPTIONS): Disable
&& TYPE_UNSIGNED (TREE_TYPE (@1)))))
(view_convert @1)))
+/* Simplify a view-converted empty constructor. */
+(simplify
+ (view_convert CONSTRUCTOR@0)
+ (if (TREE_CODE (@0) != SSA_NAME
+ && CONSTRUCTOR_NELTS (@0) == 0)
+ { build_zero_cst (type); }))
+
/* Re-association barriers around constants and other re-association
barriers can be removed. */
(simplify
+2019-04-25 Richard Biener <rguenther@suse.de>
+
+ PR middle-end/90194
+ * g++.dg/torture/pr90194.C: New testcase.
+
2019-04-24 Marek Polacek <polacek@redhat.com>
PR c++/90236
--- /dev/null
+// { dg-do compile }
+// { dg-additional-options "-g" }
+
+struct cb {
+ int yr;
+};
+
+void *
+operator new (__SIZE_TYPE__, void *nq)
+{
+ return nq;
+}
+
+void
+af (int xn)
+{
+ new (&xn) cb { };
+}