It's not necessary to do rounding for alloca operations when the requested
alignment is equal to the stack alignment.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40004 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/CFrontend/extern-weak.c b/test/CFrontend/extern-weak.c
new file mode 100644
index 0000000..b131f33
--- /dev/null
+++ b/test/CFrontend/extern-weak.c
@@ -0,0 +1,11 @@
+// RUN: %llvmgcc -O3 -S -o - -emit-llvm %s | grep extern_weak
+// RUN: %llvmgcc -O3 -S -o - -emit-llvm %s | llvm-as | llc
+
+#if !defined(__linux__) && !defined(__FreeBSD__) && !defined(__OpenBSD__)
+void foo() __attribute__((weak_import));
+#else
+void foo() __attribute__((weak));
+#endif
+
+void bar() { foo(); }
+