aboutsummaryrefslogtreecommitdiffstats
path: root/test/FrontendC/2005-12-04-AttributeUsed.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/FrontendC/2005-12-04-AttributeUsed.c')
-rw-r--r--test/FrontendC/2005-12-04-AttributeUsed.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/FrontendC/2005-12-04-AttributeUsed.c b/test/FrontendC/2005-12-04-AttributeUsed.c
new file mode 100644
index 0000000..33e27e8
--- /dev/null
+++ b/test/FrontendC/2005-12-04-AttributeUsed.c
@@ -0,0 +1,8 @@
+// RUN: %llvmgcc %s -S -emit-llvm -o - | llvm-as | llvm-dis | \
+// RUN: grep llvm.used | grep foo | grep X
+
+int X __attribute__((used));
+int Y;
+
+__attribute__((used)) void foo() {}
+