xref: /minix3/external/bsd/llvm/dist/clang/test/CodeGenCXX/debug-info-determinism.cpp (revision f4a2713ac843a11c696ec80c0a5e3e5d80b4d338)
1*f4a2713aSLionel Sambuc // RUN: %clang_cc1 -S -emit-llvm -g -o %t1.ll %s
2*f4a2713aSLionel Sambuc // RUN: %clang_cc1 -S -emit-llvm -g -o %t2.ll %s
3*f4a2713aSLionel Sambuc // RUN: diff %t1.ll %t2.ll
4*f4a2713aSLionel Sambuc 
5*f4a2713aSLionel Sambuc template <int N> struct C {
fC6*f4a2713aSLionel Sambuc   template <int M> int f() {
7*f4a2713aSLionel Sambuc     int arr[M] = {};
8*f4a2713aSLionel Sambuc     return arr[M/2] + C<M/2>().template f<M-1>();
9*f4a2713aSLionel Sambuc   }
10*f4a2713aSLionel Sambuc };
f()11*f4a2713aSLionel Sambuc template <> template <> int C<0>::f<0>() { return 0; }
f()12*f4a2713aSLionel Sambuc template <> template <> int C<0>::f<1>() { return 0; }
f()13*f4a2713aSLionel Sambuc template <> template <> int C<1>::f<0>() { return 0; }
f()14*f4a2713aSLionel Sambuc template <> template <> int C<1>::f<1>() { return 0; }
15*f4a2713aSLionel Sambuc 
16*f4a2713aSLionel Sambuc int x = C<0>().f<64>();
17