diff gcc/testsuite/g++.dg/tree-ssa/pr94224.C @ 19:2b5abeee2509 default tip

update gcc11
author anatofuz
date Mon, 25 May 2020 07:50:57 +0900
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/gcc/testsuite/g++.dg/tree-ssa/pr94224.C	Mon May 25 07:50:57 2020 +0900
@@ -0,0 +1,34 @@
+// PR tree-optimization/94224
+// { dg-do compile }
+// { dg-options "-O2 -fnon-call-exceptions -Wno-return-type" }
+
+void foo (int, int, long);
+
+static inline int
+bar (int &x)
+{
+  x = 0;
+}
+
+struct U
+{
+  int n, p;
+  long q;
+  bool *z;
+  int a;
+  U () : n (), z (), a (1) {}
+  ~U () { if (n) foo (p, n, q); }
+  void baz () { bar (a); }
+};
+
+struct W
+{
+  U w[2];
+  W () { w[0].baz (); }
+};
+
+void
+qux ()
+{
+  new W;
+}