Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / clang / test / CXX / expr / expr.unary / expr.new / p17-crash.cpp
blob27b915e95965d7e586c6ebce4111c568ca205064
1 // RUN: %clang_cc1 -emit-llvm-only %s
3 // this used to crash due to templ<int>'s dtor not being marked as used by the
4 // new expression in func()
5 struct non_trivial {
6 non_trivial() {}
7 ~non_trivial() {}
8 };
9 template < typename T > class templ {
10 non_trivial n;
12 void func() {
13 new templ<int>[1][1];