Hi,

The case depends on GCC inlining of global function, but the callee won't be
inlined because it's global function and considered over-writable during
run-time.
This patch fixes the failure by binding it to pic locally.  Is it OK?

Thanks,
bin

gcc/testsuite/ChangeLog
2014-08-07  Bin Cheng  <bin.ch...@arm.com>

        * c-c++-common/addrtmp.c: Bind pic locally.
Index: gcc/testsuite/c-c++-common/addrtmp.c
===================================================================
--- gcc/testsuite/c-c++-common/addrtmp.c        (revision 213529)
+++ gcc/testsuite/c-c++-common/addrtmp.c        (working copy)
@@ -1,5 +1,6 @@
 /* { dg-do compile } */
 /* { dg-options "-O2" } */
+/* { dg-add-options bind_pic_locally } */
 
 typedef struct A { int a,b; } A;
 int*g(int*x){return x;}

Reply via email to