On 14 January 2016 at 10:38, Weiming Zhao via cfe-commits < cfe-commits@lists.llvm.org> wrote:
> weimingz added a comment. > > Hi Nick, > > Below is a reduced code: > t.c: > > static long double acoshl (long double __x) __asm__ ("" "acosh") ; // > this is from <gcc4.9>/arm-linux-gnueabi/libc/usr/include/bits/mathcalls.h > extern long double acoshl (long double) __asm__ ("" "__acoshl_finite") ; > // this is from existing code > > GCC gives warning like: > /tmp/t.c:2:1: warning: asm declaration ignored due to conflict with > previous rename [-Wpragmas] > extern long double acoshl (long double) __asm__ ("" "__acoshl_finite") ; > That's the same case as in this testcase: void foo() __asm__("one"); void foo() __asm__("two"); void test() { foo(); } GCC emits a call to 'one' while Clang emits a call to 'two'. This is a real bug. Please don't downgrade this to a warning. As an alternative, I would accept a patch which changes how clang generates code so that it also produces a call to 'one', with a warning. It looks like what we need to do is drop subsequent asm label declarations on functions that already have one. Nick
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits