1 // PR 11767
2 // { dg-do run }
3 // { dg-require-profiling "" }
4 // { dg-options "-fnon-call-exceptions -fprofile-arcs" }
5
6 #include <string>
7
8 typedef unsigned long ACE_UINT32;
9 extern "C" void abort();
10
11 static ACE_UINT32 const msc_maxCurrencyID = 9999;
12
13 class ResourceBalanceType2
14 {
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;
27 };
28
f()29 void f(){}
30
ResourceBalanceType2(ACE_UINT32 resourceBalanceTypeID,ACE_UINT32 isoValue,const std::string & rc_shortName,const std::string & rc_symbol)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)
40 {
41 bool isGreater = (mc_isoValue > msc_maxCurrencyID);
42 f();
43 bool temp = mc_isoValue > msc_maxCurrencyID;
44 if (!isGreater) abort();
45 if (!temp) abort();
46 }
47
main(int argc,char * argv[])48 int main (int argc, char * argv[])
49 {
50 ACE_UINT32 const mc_isoValue = 10000;
51 ResourceBalanceType2 rbResourceBalanceType2(3, mc_isoValue, "ATM", "M");
52 }
53
54 // { dg-final { cleanup-coverage-files } }
55