diff options
author | Chris Lattner <sabre@nondot.org> | 2009-03-21 09:25:43 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-03-21 09:25:43 +0000 |
commit | 0558e79840bfdbbd38c6e2b4f6765bf0158e85f4 (patch) | |
tree | 27e7ea0bea57cae00a0147643ec0fe7a8b70d346 /test/CodeGen/mangle.c | |
parent | 570585c91dee98d7ba8ccf1198c03208ba17966b (diff) |
fix a crash that could occur when a variable declaration became a
function definition.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67446 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/mangle.c')
-rw-r--r-- | test/CodeGen/mangle.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/CodeGen/mangle.c b/test/CodeGen/mangle.c index bcb1400dd5..89e0e8a79a 100644 --- a/test/CodeGen/mangle.c +++ b/test/CodeGen/mangle.c @@ -36,3 +36,14 @@ void test2() { } int foo4 __asm__("var") = 4; + +// Variable becomes a function +extern int foo5 __asm__("var2"); + +void test3() { + foo5 = 1; +} + +void foo6() __asm__("var2"); +void foo6() { +} |