Merge from mainline (160224:163495).
[official-gcc/graphite-test-results.git] / gcc / testsuite / g++.dg / other / profile1.C
bloba4bf6b3d0fea7a9855a8ee08c763456e68776455
1 // PR 11767
2 // { dg-do run }
3 // { dg-require-profiling "" }
4 // { dg-options "-fnon-call-exceptions -fprofile-arcs" }
6 #include <string>
8 typedef unsigned long ACE_UINT32;
9 extern "C" void abort();
11 static ACE_UINT32 const msc_maxCurrencyID = 9999;
13 class ResourceBalanceType2
15   public:
16    explicit ResourceBalanceType2(
17       ACE_UINT32 resourceBalanceTypeID,
18       ACE_UINT32 isoValue,
19       const std::string& rc_shortName,
20       const std::string& rc_symbol
21     );
22   public:
23     const ACE_UINT32 mc_resBalTypeID;
24     const ACE_UINT32 mc_isoValue;
25     const std::string mc_shortName;
26     const std::string mc_symbol;
29 void f(){}
31 ResourceBalanceType2::ResourceBalanceType2(
32     ACE_UINT32 resourceBalanceTypeID,
33     ACE_UINT32 isoValue,
34     const std::string& rc_shortName,
35     const std::string& rc_symbol)
36   : mc_resBalTypeID(resourceBalanceTypeID),
37     mc_isoValue(isoValue),
38     mc_shortName(rc_shortName),
39     mc_symbol(rc_symbol)
41   bool isGreater = (mc_isoValue > msc_maxCurrencyID);
42   f();
43   bool temp = mc_isoValue > msc_maxCurrencyID;
44   if (!isGreater) abort();
45   if (!temp) abort();
48 int main (int argc, char * argv[])
50   ACE_UINT32 const mc_isoValue = 10000;
51   ResourceBalanceType2 rbResourceBalanceType2(3, mc_isoValue, "ATM", "M");
54 // { dg-final { cleanup-coverage-files } }