Fix build error for tst-printf-bz18872 on arm/aarch64 and s390
diff mbox

Message ID CALoOobMEO3sxuxZWtcou-=Dz14RJq-=yPE66ORAqPMzhBT9shw@mail.gmail.com
State New
Headers show

Commit Message

Paul Pluzhnikov Oct. 8, 2015, 5:09 a.m. UTC
On Wed, Oct 7, 2015 at 10:06 PM, Paul Pluzhnikov <ppluzhnikov@google.com> wrote:
> On Wed, Oct 7, 2015 at 8:13 PM, Paul Pluzhnikov <ppluzhnikov@google.com> wrote:
>
> The attribute nicely works around the aarch64 break.
>
> Thanks!
>
> 2015-10-07  Paul Pluzhnikov  <ppluzhnikov@google.com>
>
>         * stdio-common/tst-printf-bz18872.sh: Use attribute optimize instead of
>         #pragma optimize.

And again with space-before-paren.

Thanks,

Comments

Florian Weimer Oct. 8, 2015, 5:15 a.m. UTC | #1
On 10/08/2015 07:09 AM, Paul Pluzhnikov wrote:
> On Wed, Oct 7, 2015 at 10:06 PM, Paul Pluzhnikov <ppluzhnikov@google.com> wrote:
>> On Wed, Oct 7, 2015 at 8:13 PM, Paul Pluzhnikov <ppluzhnikov@google.com> wrote:
>>
>> The attribute nicely works around the aarch64 break.
>>
>> Thanks!
>>
>> 2015-10-07  Paul Pluzhnikov  <ppluzhnikov@google.com>
>>
>>         * stdio-common/tst-printf-bz18872.sh: Use attribute optimize instead of
>>         #pragma optimize.
> 
> And again with space-before-paren.

One space still missing (although the space rule does not apply to (all)
macros, only to function calls, so it's slightly unclear what's correct
for attributes).

Can you say in the commit message that this is to work around breakage
on aarch64?

Florian
Paul Pluzhnikov Oct. 8, 2015, 5:19 a.m. UTC | #2
On Wed, Oct 7, 2015 at 10:15 PM, Florian Weimer <fweimer@redhat.com> wrote:

>> And again with space-before-paren.
>
> One space still missing (although the space rule does not apply to (all)
> macros, only to function calls, so it's slightly unclear what's correct
> for attributes).

Other examples have more spaces, e.g.

__attribute__ ((section (".text.fma4")))

so I'll add the other missing space.

> Can you say in the commit message that this is to work around breakage
> on aarch64?

Sure. Ok to commit then?

Thanks,
Florian Weimer Oct. 8, 2015, 5:20 a.m. UTC | #3
On 10/08/2015 07:19 AM, Paul Pluzhnikov wrote:

>> Can you say in the commit message that this is to work around breakage
>> on aarch64?
> 
> Sure. Ok to commit then?

Yes, please.  Thanks for fixing this.

Florian
Stefan Liebler Oct. 8, 2015, 8:13 a.m. UTC | #4
Hi Paul,

the testcase is building and passing on s390x.

Thanks.

On 10/08/2015 07:09 AM, Paul Pluzhnikov wrote:
> On Wed, Oct 7, 2015 at 10:06 PM, Paul Pluzhnikov <ppluzhnikov@google.com> wrote:
>> On Wed, Oct 7, 2015 at 8:13 PM, Paul Pluzhnikov <ppluzhnikov@google.com> wrote:
>>
>> The attribute nicely works around the aarch64 break.
>>
>> Thanks!
>>
>> 2015-10-07  Paul Pluzhnikov  <ppluzhnikov@google.com>
>>
>>          * stdio-common/tst-printf-bz18872.sh: Use attribute optimize instead of
>>          #pragma optimize.
>
> And again with space-before-paren.
>
> Thanks,
>

Patch
diff mbox

diff --git a/stdio-common/tst-printf-bz18872.sh b/stdio-common/tst-printf-bz18872.sh
index 0127e73..84076c0 100644
--- a/stdio-common/tst-printf-bz18872.sh
+++ b/stdio-common/tst-printf-bz18872.sh
@@ -30,9 +30,8 @@  cat <<'EOF'
 /*
   Compile do_test without optimization: GCC 4.9/5.0/6.0 takes a long time
   to build this source. https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67396  */
-#pragma GCC push_options
-#pragma GCC optimize ("-O0")
 
+__attribute__ ((optimize("-O0")))
 int do_test (void)
 {
     mtrace ();
@@ -62,7 +61,6 @@  cat <<'EOF'
 
   return 0;
 }
-#pragma GCC pop_options
 
 #define TEST_FUNCTION do_test ()
 #include "../test-skeleton.c"