OpenCores
URL https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.2.2/] [gcc/] [testsuite/] [g++.dg/] [other/] [profile1.C] - Blame information for rev 154

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 149 jeremybenn
// PR 11767
2
// { dg-do run }
3
// { dg-options "-fnon-call-exceptions -fprofile-arcs" }
4
 
5
#include 
6
 
7
typedef unsigned long ACE_UINT32;
8
extern "C" void abort();
9
 
10
static ACE_UINT32 const msc_maxCurrencyID = 9999;
11
 
12
class ResourceBalanceType2
13
{
14
  public:
15
   explicit ResourceBalanceType2(
16
      ACE_UINT32 resourceBalanceTypeID,
17
      ACE_UINT32 isoValue,
18
      const std::string& rc_shortName,
19
      const std::string& rc_symbol
20
    );
21
  public:
22
    const ACE_UINT32 mc_resBalTypeID;
23
    const ACE_UINT32 mc_isoValue;
24
    const std::string mc_shortName;
25
    const std::string mc_symbol;
26
};
27
 
28
void f(){}
29
 
30
ResourceBalanceType2::ResourceBalanceType2(
31
    ACE_UINT32 resourceBalanceTypeID,
32
    ACE_UINT32 isoValue,
33
    const std::string& rc_shortName,
34
    const std::string& rc_symbol)
35
  : mc_resBalTypeID(resourceBalanceTypeID),
36
    mc_isoValue(isoValue),
37
    mc_shortName(rc_shortName),
38
    mc_symbol(rc_symbol)
39
{
40
  bool isGreater = (mc_isoValue > msc_maxCurrencyID);
41
  f();
42
  bool temp = mc_isoValue > msc_maxCurrencyID;
43
  if (!isGreater) abort();
44
  if (!temp) abort();
45
}
46
 
47
int main (int argc, char * argv[])
48
{
49
  ACE_UINT32 const mc_isoValue = 10000;
50
  ResourceBalanceType2 rbResourceBalanceType2(3, mc_isoValue, "ATM", "M");
51
}
52
 
53
// { dg-final { cleanup-coverage-files } }

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.