summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/prof-robust-1.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.dg/prof-robust-1.C')
-rw-r--r--gcc/testsuite/g++.dg/prof-robust-1.C24
1 files changed, 24 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/prof-robust-1.C b/gcc/testsuite/g++.dg/prof-robust-1.C
new file mode 100644
index 00000000000..a5d8cb3c470
--- /dev/null
+++ b/gcc/testsuite/g++.dg/prof-robust-1.C
@@ -0,0 +1,24 @@
+/* { dg-options "-O2 -fno-weak" } */
+
+#include <stdio.h>
+
+namespace {
+ namespace {
+
+ class MyClass {
+ public:
+ void foo() const;
+ ~MyClass() { foo(); }
+ };
+
+ void MyClass::foo() const { printf("Goodbye World\n"); }
+
+ }
+
+ static MyClass variable;
+
+}
+
+int main() {
+ return 0;
+}