develooper Front page | perl.perl5.porters | Postings from January 2019

Re: [perl #133495] perl-5.28.0 fails to build on Solaris 10

Thread Previous | Thread Next
From:
Leon Timmermans
Date:
January 17, 2019 15:36
Subject:
Re: [perl #133495] perl-5.28.0 fails to build on Solaris 10
Message ID:
CAHhgV8gnKqVD8uSf+vKJCOrpbYQ1UW=j-_jhD0kaP_UaEXT+0g@mail.gmail.com
On Thu, Jan 17, 2019 at 9:26 AM Fabian Groffen via RT
<perlbug-followup@perl.org> wrote:
> I think that the GCC compiler is actually doing "too smart" things here when optimisations are enabled.
>
> /usr/sfw/bin/gcc -O2 -> 4
> gcc-6.4.0 -O2 -> 4
> gcc-7.3.0 -O2 -> 4
> gcc-8.2.0 -O2 -> 0
> /usr/sfw/bin/gcc -g -> 4
> gcc-6.4.0 -g -> 4
> gcc-7.3.0 -g -> 4
> gcc-8.2.0 -g -> 4
>
> Behaviour seems to be pretty much limited to gcc-8.2 while optimising at the moment.

Yeah. I guess that means we need a better test that confuses the
compiler a little bit more. One would expect volatile to take care of
that but apparently not; The C standard is notoriously fuzzy on
volatiles (C99 6.7.6).

What happens if you put the array outside the function?

> Yes, including the fact that at the time I compiled 5.26.2, I used GCC-7.3, which produced the correct result for the unaligned check.
>
> This makes me wonder what the problem of OP is, though.  His env seems to suggest using GCC-4.9, which I don't have anymore for verification of the results.

They did use -O3, so I guess that always enabled that optimization.

Leon

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About