diff options
Diffstat (limited to 'test/FrontendC/2002-05-23-StaticValues.c')
-rw-r--r-- | test/FrontendC/2002-05-23-StaticValues.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/test/FrontendC/2002-05-23-StaticValues.c b/test/FrontendC/2002-05-23-StaticValues.c new file mode 100644 index 000000000000..bf583e203d35 --- /dev/null +++ b/test/FrontendC/2002-05-23-StaticValues.c @@ -0,0 +1,15 @@ +// RUN: %llvmgcc -S %s -o - | llvm-as -f -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; +} |