* auto-profile.c (afdo_annotate_cfg): Use update_max_bb_count.
[official-gcc.git] / gcc / testsuite / g++.dg / init / vbase1.C
blob0cba1ad5308bfbed484d167272010341946db91d
1 // PR c++/50618
2 // { dg-options "-fdump-rtl-expand" }
3 // { dg-do run }
5 struct Base
7     const int text;
8     Base():text(1) {}
9     Base(int aText)
10     : text(aText) {}
12 struct SubA : public virtual Base
14 protected:
15   int x;
16 public:
17   SubA(int aX)
18   : x(aX) {}
20 class SubB : public virtual Base
21 {};
22 struct Diamond : public SubA, public SubB
24     Diamond(int text)
25     : Base(text), SubA(5), SubB() {}
27     void printText()
28     {
29         if(text != 2)
30           __builtin_abort();
31         if(x!=5)
32           __builtin_abort();
33     }
36 int main(int, char**)
38     Diamond x(2);
39     x.printText();
42 // Verify that the SubB() mem-initializer is storing 0 directly into
43 // this->D.whatever rather than into a stack temp that is then copied into the
44 // base field.
45 // { dg-final { scan-rtl-dump "set \[^\n\]*\n\[^\n\]*this\[^\n\]*\n\[^\n\]*const_int 0" "expand" { target { i?86-*-* x86_64-*-* } } } }