summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/opt/compound1.C
blob: cf81e69808986bbe17eaaef5fd339134231bc983 (plain)
1
2
3
4
5
6
7
8
9
10
11
// PR c++/33709
// { dg-do compile }
// { dg-options "-O2" }

class S {
  virtual void foo ();
};
struct T {
  S *s;
  void bar (unsigned x) { s = (new S[1]) - x; }
};