aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.c-torture/compile/20011119-2.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.9/gcc/testsuite/gcc.c-torture/compile/20011119-2.c')
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.c-torture/compile/20011119-2.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/gcc.c-torture/compile/20011119-2.c b/gcc-4.9/gcc/testsuite/gcc.c-torture/compile/20011119-2.c
new file mode 100644
index 000000000..e06809f33
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/gcc.c-torture/compile/20011119-2.c
@@ -0,0 +1,12 @@
+/* { dg-require-weak "" } */
+/* { dg-require-alias "" } */
+#define ASMNAME(cname) ASMNAME2 (__USER_LABEL_PREFIX__, cname)
+#define ASMNAME2(prefix, cname) STRING (prefix) cname
+#define STRING(x) #x
+
+extern inline int foo (void) { return 23; }
+int bar (void) { return foo (); }
+extern int foo (void) __attribute__ ((weak, alias ("xxx")));
+int baz (void) { return foo (); }
+int xxx(void) __asm__(ASMNAME ("xxx"));
+int xxx(void) { return 23; }