summaryrefslogtreecommitdiffstats
path: root/test/CodeGen/hidden-alias-to-internal-function.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/CodeGen/hidden-alias-to-internal-function.c')
-rw-r--r--test/CodeGen/hidden-alias-to-internal-function.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/CodeGen/hidden-alias-to-internal-function.c b/test/CodeGen/hidden-alias-to-internal-function.c
new file mode 100644
index 0000000..e939228
--- /dev/null
+++ b/test/CodeGen/hidden-alias-to-internal-function.c
@@ -0,0 +1,8 @@
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -emit-llvm -o - -x c %s | FileCheck %s
+// Reproduce the crash in PR19760.
+static void foo(void) {}
+void bar(void) __attribute__((alias("foo")))
+__attribute__((visibility("hidden")));
+
+// CHECK: @bar = hidden alias void ()* @foo
+// CHECK: define internal void @foo()
OpenPOWER on IntegriCloud