summaryrefslogtreecommitdiff
path: root/clang/test/CodeGen/2002-05-23-StaticValues.c
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/CodeGen/2002-05-23-StaticValues.c')
-rw-r--r--clang/test/CodeGen/2002-05-23-StaticValues.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/clang/test/CodeGen/2002-05-23-StaticValues.c b/clang/test/CodeGen/2002-05-23-StaticValues.c
new file mode 100644
index 0000000..b8c25b7
--- /dev/null
+++ b/clang/test/CodeGen/2002-05-23-StaticValues.c
@@ -0,0 +1,15 @@
+// RUN: %clang_cc1 -emit-llvm %s -o /dev/null
+
+/* Make sure the frontend is correctly marking static stuff as internal! */
+
+int X;
+static int Y = 12;
+
+static void foo(int Z) {
+ Y = Z;
+}
+
+void *test() {
+ foo(12);
+ return &Y;
+}