summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/special/conpr-1.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.dg/special/conpr-1.C')
-rwxr-xr-xgcc/testsuite/g++.dg/special/conpr-1.C18
1 files changed, 18 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/special/conpr-1.C b/gcc/testsuite/g++.dg/special/conpr-1.C
new file mode 100755
index 0000000..8ab6bfe
--- /dev/null
+++ b/gcc/testsuite/g++.dg/special/conpr-1.C
@@ -0,0 +1,18 @@
+/* { dg-do run } */
+
+class foo_t {
+ int x;
+public:
+ foo_t(void) { x=1; }
+ int get(void) { return x; }
+};
+
+static foo_t foo __attribute__((init_priority(5000)));
+
+int main(void) {
+
+ if (foo.get())
+ exit(0);
+ else
+ abort();
+}