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
diff --git a/test/CodeGen/mangle.c b/test/CodeGen/mangle.c
index bcb1400..89e0e8a 100644
--- a/test/CodeGen/mangle.c
+++ b/test/CodeGen/mangle.c
@@ -36,3 +36,14 @@
}
int foo4 __asm__("var") = 4;
+
+// Variable becomes a function
+extern int foo5 __asm__("var2");
+
+void test3() {
+ foo5 = 1;
+}
+
+void foo6() __asm__("var2");
+void foo6() {
+}