* auto-profile.c (afdo_annotate_cfg): Use update_max_bb_count.
[official-gcc.git] / gcc / testsuite / g++.dg / pr79095-4.C
blobdf550257465274c5c048e9a21e70fb82e14a25e5
1 /* { dg-do compile } */
2 /* { dg-options "-Wall -O3 -fdump-tree-vrp2" } */
4 #include <vector>
6 void foo(std::vector<unsigned int> &v);
8 void vtest()
10   std::vector<unsigned int> v;
11   foo (v);
12   {
13     v.resize (v.size()-1);
14   }
17 /* As written this testcase should trigger a warning.  We overflow to -1U
18    if v.size() == 0 in foo().  This results in bogus calls to memset.
20    The number of clearing loops in the IL can vary depending on the C++
21    mode used for the test.  But by the end of VRP2, there should be a single
22    clearing loop left and it should be using memcpy.  */
23 /* { dg-final { scan-tree-dump-times  "__builtin_memset \\(_\[0-9\]+, 0, \[0-9\]+\\)" 1 "vrp2" } } */
25 /* And that call should trigger a warning.  */
26 /* { dg-warning "exceeds maximum object size" "" { target *-*-* } 0 } */