aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/other
diff options
context:
space:
mode:
authorrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>2004-03-03 00:46:31 +0000
committerrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>2004-03-03 00:46:31 +0000
commitefdbd363744b0b593c5f4e94b682e2cd245fdc99 (patch)
tree9cd7068f6100d96ff5985e0db5be17b96d0a61e9 /gcc/testsuite/g++.dg/other
parenta2b9a662bd8f52d2a131cf369dcbd37c5be6eb7a (diff)
* coverage.c (coverage_counter_ref): Set MEM_NOTRAP_P.
* optabs.c (prepare_cmp_insn): Force trapping memories to registers before the compare, if flag_non_call_exceptions. * g++.dg/other/profile1.C: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@78806 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/g++.dg/other')
-rw-r--r--gcc/testsuite/g++.dg/other/profile1.C51
1 files changed, 51 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 00000000000..bc92460830b
--- /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 <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");
+}