diff mbox

[testcase] Add bind_pic_locally to case addrtmp.c

Message ID 000601cfb224$040fb9e0$0c2f2da0$@arm.com
State New
Headers show

Commit Message

Bin Cheng Aug. 7, 2014, 9:43 a.m. UTC
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.cheng@arm.com>

	* c-c++-common/addrtmp.c: Bind pic locally.

Comments

Bin.Cheng Aug. 7, 2014, 9:54 a.m. UTC | #1
On Thu, Aug 7, 2014 at 5:43 PM, Bin Cheng <bin.cheng@arm.com> wrote:
> 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.
It won't be inlined only if it's tested against -fpic/-fPIC.

> 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.cheng@arm.com>
>
>         * c-c++-common/addrtmp.c: Bind pic locally.
Bin.Cheng Aug. 11, 2014, 7:14 a.m. UTC | #2
On Thu, Aug 7, 2014 at 5:54 PM, Bin.Cheng <amker.cheng@gmail.com> wrote:
> On Thu, Aug 7, 2014 at 5:43 PM, Bin Cheng <bin.cheng@arm.com> wrote:
>> 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.
> It won't be inlined only if it's tested against -fpic/-fPIC.
>
>> 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.cheng@arm.com>
>>
>>         * c-c++-common/addrtmp.c: Bind pic locally.


Hi,
This is a simple test case change, could somebody have a look at it?

Thanks,
bin
Jeff Law Aug. 13, 2014, 6:48 p.m. UTC | #3
On 08/07/14 03:43, Bin Cheng wrote:
> 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.cheng@arm.com>
>
> 	* c-c++-common/addrtmp.c: Bind pic locally.
OK.
jeff
diff mbox

Patch

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;}