Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / compiler-rt / test / sanitizer_common / TestCases / symbolize_stack.cpp
blob02fe571f416b381146f5343bd1c6475985e3377a
1 // RUN: %clangxx -O0 %s -o %t && %run %t 2>&1 | FileCheck %s
3 // Test that symbolizer does not crash on frame with large function name.
5 // On Darwin LSan reports a false positive
6 // UNSUPPORTED: darwin && lsan
8 #include <sanitizer/common_interface_defs.h>
9 #include <vector>
11 template <int N> struct A {
12 template <class T> void RecursiveTemplateFunction(const T &t);
15 template <int N>
16 template <class T>
17 __attribute__((noinline)) void A<N>::RecursiveTemplateFunction(const T &) {
18 std::vector<T> t;
19 return A<N - 1>().RecursiveTemplateFunction(t);
22 template <>
23 template <class T>
24 __attribute__((noinline)) void A<0>::RecursiveTemplateFunction(const T &) {
25 __sanitizer_print_stack_trace();
28 int main() {
29 // CHECK: {{vector<.*vector<.*vector<.*vector<.*vector<}}
30 A<10>().RecursiveTemplateFunction(0);