bug-gawk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [bug-gawk] gawk 4.1.4 is not 100% ANSI


From: arnold
Subject: Re: [bug-gawk] gawk 4.1.4 is not 100% ANSI
Date: Tue, 25 Oct 2016 13:02:35 -0600
User-agent: Heirloom mailx 12.4 7/29/08

Hello.

I'm afraid your note isn't clear. It sounds like:

        -qalias=ansi  -O0       works
        -qalias=ansi  -O2       does not work

or else you meant:

        -qalias=noansi  -O0     works
        -qalias=noansi  -O2     works

Which is it?  If the former, it's a compiler bug.

If the latter, then without some guidance as to what the compiler thinks
is not ansi, I cannot help you further. I do not have access to AIX
or its compiler.

If you can use git and wish to try to figure it out using git bisect,
that would be helpful.

Or you can just live with adding -qalias=noansi when compiling gawk
and I can add a README.aix file to the distibution to document it.

Thanks,

Arnold

"REIX, Tony" <address@hidden> wrote:

> I confirm the issue with gawk code being no more 100 ANSI and leading to
> ANSI-optimization by the xlc compiler that generate wrong optimized code:
>
> when compiling gawk 4.1.4 with "xlc -O0" rather than "xlc -O2", thus
> with : -qalias=ansi for both -O0 and -O2, the cores do not appear.
>
> Regards,
>
> Tony
>
> Le 25/10/2016 à 10:03, Tony REIX a écrit :
>
> Tests with version 4.0.2 are OK.
>
> I cannot compile 4.1.0 .
>
> Cores start to appear within version 4.1.1 . However not all tests core. Only 
> 51 tests.
>
> So, the issue seems to have appeared with version 4.1.0 or 4.1.1 .
>
> Regards,
>
> Tony
>
> Le 25/10/2016 à 09:46, Tony REIX a écrit :
>
> Hi,
>
> We compile gawk on AIX, with the IBM xlc compiler, with -O2.
> Something like:
>
> DEPDIR=.deps depmode=aix /opt/freeware/bin/bash ./depcomp \
> /usr/vac/bin/xlc_r -DDEFPATH='".:/opt/freeware/share/awk"' -DHAVE_CONFIG_H 
> -DGAWK \
>    -DLOCALEDIR='"/opt/freeware/share/locale"' -I.   -I/opt/freeware/include \
>    -O2  -D_LARGE_FILES -D_XOPEN_SOURCE_EXTENDED=1 -DGAWK_AIX=1 -c array.c
>
>
> With version 4.0.0, all tests but 4 are OK.
>
> With version 4.1.4, all tests fail due to a core dump.
>
>
> By default, the /usr/vac/bin/xlc compiler makes use of: -qalias=ansi .
> That means that the compiler expects the code to be 100% ANSI, and thus it 
> does optimizations that rely on this.
>
> When adding: -qalias=noansi to the xlc command, all tests but 6 do succeed.
>
>
> So, it seems to us that the changes from version 4.0.0 to 4.1.4 has added 
> some not-ANSI code, preventing optimizations to be used.
>
>
> Regards,
>
> Tony
>
>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]