* auto-profile.c (afdo_annotate_cfg): Use update_max_bb_count.
[official-gcc.git] / gcc / testsuite / g++.dg / other / pr53574.C
blobcc899a552c8fae41b173d72f822892b213b35300
1 // PR c++/53574
2 // { dg-do compile { target c++11 } }
3 // { dg-options "-fstack-usage" }
5 template <typename> struct A { typedef int type; };
6 struct B {
7   typedef __SIZE_TYPE__ H;
8 };
9 template <typename> class allocator : B {};
10 template <typename _Alloc> struct C {
11   template <typename T>
12   static typename T::H foo(T *);
13   typedef decltype(foo((_Alloc *)0)) H;
14   template <typename U>
15   static typename A<H>::type bar(U) { return typename A<H>::type (); }
16   static int baz(_Alloc p1) { bar(p1); return 0; }
18 template <typename _Alloc> struct I : C<_Alloc> {};
19 template <typename, typename> struct J {
20   typedef I<allocator<int>> K;
21   K k;
23 struct D : J<int, allocator<int>> {
24   void fn(int, int) {
25     K m;
26     I<K>::baz(m);
27   }
29 template <class Ch, class = int, class = int> struct F {
30   F();
31   F(const Ch *);
32   F test();
33   D d;
35 int l;
36 struct G {
37   G(F<char>);
39 char n;
40 template <class Ch, class Tr, class Alloc> F<Ch, Tr, Alloc>::F(const Ch *) {
41   test();
43 template <class Ch, class Tr, class Alloc>
44 F<Ch, Tr, Alloc> F<Ch, Tr, Alloc>::test() {
45   d.fn(l, 0);
46   return F<Ch, Tr, Alloc> ();
48 G fn1() { return G(&n); }