From: No Author Date: Wed, 3 Mar 2004 00:48:54 +0000 (+0000) Subject: This commit was manufactured by cvs2svn to create branch X-Git-Tag: releases/gcc-3.3.4~206 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5e822d8aa2a35f741de95c1b9ac324ec360a8503;p=thirdparty%2Fgcc.git This commit was manufactured by cvs2svn to create branch 'gcc-3_3-branch'. From-SVN: r78807 --- diff --git a/gcc/testsuite/g++.dg/other/profile1.C b/gcc/testsuite/g++.dg/other/profile1.C new file mode 100644 index 000000000000..bc92460830bf --- /dev/null +++ b/gcc/testsuite/g++.dg/other/profile1.C @@ -0,0 +1,51 @@ +// PR 11767 +// { dg-do run } +// { dg-options "-fnon-call-exceptions -fprofile-arcs" } + +#include + +typedef unsigned long ACE_UINT32; +extern "C" void abort(); + +static ACE_UINT32 const msc_maxCurrencyID = 9999; + +class ResourceBalanceType2 +{ + public: + explicit ResourceBalanceType2( + ACE_UINT32 resourceBalanceTypeID, + ACE_UINT32 isoValue, + const std::string& rc_shortName, + const std::string& rc_symbol + ); + public: + const ACE_UINT32 mc_resBalTypeID; + const ACE_UINT32 mc_isoValue; + const std::string mc_shortName; + const std::string mc_symbol; +}; + +void f(){} + +ResourceBalanceType2::ResourceBalanceType2( + ACE_UINT32 resourceBalanceTypeID, + ACE_UINT32 isoValue, + const std::string& rc_shortName, + const std::string& rc_symbol) + : mc_resBalTypeID(resourceBalanceTypeID), + mc_isoValue(isoValue), + mc_shortName(rc_shortName), + mc_symbol(rc_symbol) +{ + bool isGreater = (mc_isoValue > msc_maxCurrencyID); + f(); + bool temp = mc_isoValue > msc_maxCurrencyID; + if (!isGreater) abort(); + if (!temp) abort(); +} + +int main (int argc, char * argv[]) +{ + ACE_UINT32 const mc_isoValue = 10000; + ResourceBalanceType2 rbResourceBalanceType2(3, mc_isoValue, "ATM", "M"); +}