aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/lto/attr-weakref-1_0.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.dg/lto/attr-weakref-1_0.c')
-rw-r--r--gcc/testsuite/gcc.dg/lto/attr-weakref-1_0.c29
1 files changed, 29 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/lto/attr-weakref-1_0.c b/gcc/testsuite/gcc.dg/lto/attr-weakref-1_0.c
new file mode 100644
index 0000000..1e02f68
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/lto/attr-weakref-1_0.c
@@ -0,0 +1,29 @@
+/* { dg-lto-do run } */
+int first = 0;
+void abort (void);
+int second = 0;
+void callmealias (void)
+{
+ if (!first || !second)
+ abort ();
+}
+void callmefirst (void)
+{
+ if (first)
+ abort();
+ first = 1;
+}
+void callmesecond (void)
+{
+ if (!first)
+ abort();
+ if (second)
+ abort();
+ second = 1;
+}
+main()
+{
+ c();
+ b();
+ return 0;
+}