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

Subversion Repositories openrisc_me

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

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 301 jeremybenn
// PR 11767
2
// { dg-do run }
3
// { dg-require-profiling "-fprofile-arcs" }
4
// { dg-options "-fnon-call-exceptions -fprofile-arcs" }
5
 
6
#include 
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
 
29
void f(){}
30
 
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
 
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 } }

powered by: WebSVN 2.1.0

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