[PR c++/84702] ICE with default tmpl arg of overload set
[official-gcc.git] / gcc / testsuite / g++.dg / pr64191.C
blobda09a7752e75db108b51cb49f2a1ef4c58c0e80e
1 // { dg-do compile }
2 // { dg-options "-O2 -fdump-tree-cddce1" }
4 struct Bar
6   int i;
7   ~Bar() { }
8 };
9 void bar_dtor_loop(Bar* p, unsigned int n)
11   if (p) {
12       Bar* e = p + n;
13       while (e > p) {
14           --e;
15           e->~Bar();
16       }
17   }
20 // The clobber in ~Bar should persist but those inlined into
21 // bar_dtor_loop not, nor should the loop therein
23 // { dg-final { scan-tree-dump-times "CLOBBER" 1 "cddce1" } }
24 // { dg-final { scan-tree-dump-times "if" 0 "cddce1" } }