summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/other/profile1.C
diff options
context:
space:
mode:
authorupstream source tree <ports@midipix.org>2015-03-15 20:14:05 -0400
committerupstream source tree <ports@midipix.org>2015-03-15 20:14:05 -0400
commit554fd8c5195424bdbcabf5de30fdc183aba391bd (patch)
tree976dc5ab7fddf506dadce60ae936f43f58787092 /gcc/testsuite/g++.dg/other/profile1.C
downloadcbb-gcc-4.6.4-554fd8c5195424bdbcabf5de30fdc183aba391bd.tar.bz2
cbb-gcc-4.6.4-554fd8c5195424bdbcabf5de30fdc183aba391bd.tar.xz
obtained gcc-4.6.4.tar.bz2 from upstream website;upstream
verified gcc-4.6.4.tar.bz2.sig; imported gcc-4.6.4 source tree from verified upstream tarball. downloading a git-generated archive based on the 'upstream' tag should provide you with a source tree that is binary identical to the one extracted from the above tarball. if you have obtained the source via the command 'git clone', however, do note that line-endings of files in your working directory might differ from line-endings of the respective files in the upstream repository.
Diffstat (limited to 'gcc/testsuite/g++.dg/other/profile1.C')
-rw-r--r--gcc/testsuite/g++.dg/other/profile1.C54
1 files changed, 54 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/other/profile1.C b/gcc/testsuite/g++.dg/other/profile1.C
new file mode 100644
index 000000000..a4bf6b3d0
--- /dev/null
+++ b/gcc/testsuite/g++.dg/other/profile1.C
@@ -0,0 +1,54 @@
+// PR 11767
+// { dg-do run }
+// { dg-require-profiling "" }
+// { dg-options "-fnon-call-exceptions -fprofile-arcs" }
+
+#include <string>
+
+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");
+}
+
+// { dg-final { cleanup-coverage-files } }