Re: [PATCHv2] Handle not explicitly zero terminated strings in merge sections

2018-10-24 Thread Richard Biener
On Wed, 24 Oct 2018, Rainer Orth wrote: > Hi Eric, > > >> I know: a patch to fix this is almost ready, just needs a final round of > >> testing. > > > > OK, thanks for the information. > > here's what I've got. It took me two false starts, unfortunately: > > * Initially, I just tried linking

Re: [PATCHv2] Handle not explicitly zero terminated strings in merge sections

2018-10-24 Thread Rainer Orth
Hi Eric, >> I know: a patch to fix this is almost ready, just needs a final round of >> testing. > > OK, thanks for the information. here's what I've got. It took me two false starts, unfortunately: * Initially, I just tried linking with LD_OPTIONS='-z nocompstrtab': -z nocompstrtab

Re: [PATCHv2] Handle not explicitly zero terminated strings in merge sections

2018-10-23 Thread Eric Botcazou
> I know: a patch to fix this is almost ready, just needs a final round of > testing. OK, thanks for the information. -- Eric Botcazou

Re: [PATCHv2] Handle not explicitly zero terminated strings in merge sections

2018-10-23 Thread Rainer Orth
Hi Eric, >> it's not disabled (I had to disable it when testing an a /bin/as version >> with full SHF_MERGE/SHF_STRINGS suppurt recently), so I suspect the >> latter. In S11.4 .rodata and .rodata.str1.8 are merged, with the >> alignment of the larger of the two on the output section. > > OK.

Re: [PATCHv2] Handle not explicitly zero terminated strings in merge sections

2018-10-23 Thread Eric Botcazou
> it's not disabled (I had to disable it when testing an a /bin/as version > with full SHF_MERGE/SHF_STRINGS suppurt recently), so I suspect the > latter. In S11.4 .rodata and .rodata.str1.8 are merged, with the > alignment of the larger of the two on the output section. OK. The regressions are

Re: [PATCHv2] Handle not explicitly zero terminated strings in merge sections

2018-10-22 Thread Bernd Edlinger
Hi Rainer, On 10/9/18 3:05 PM, Rainer Orth wrote: > Hi Bernd, > >>> * The merge-all-constants-2.c test doesn't FAIL on Solaris/SPARC with >>> /bin/as, although it lacks string merging support, too. The assembler >>> output contains >>> >>> .section".rodata" >>> >>>

Re: [PATCHv2] Handle not explicitly zero terminated strings in merge sections

2018-10-10 Thread Jeff Law
On 10/9/18 6:45 AM, Bernd Edlinger wrote: > On 10/03/18 18:31, Jeff Law wrote: >>> - && (len = int_size_in_bytes (TREE_TYPE (decl))) > 0 >>> - && TREE_STRING_LENGTH (decl) >= len) >>> + && (len = int_size_in_bytes (TREE_TYPE (decl))) >= 0 >>> + && TREE_STRING_LENGTH (decl) ==

Re: [PATCHv2] Handle not explicitly zero terminated strings in merge sections

2018-10-10 Thread Rainer Orth
Hi Eric, >> This isn't necessary on Solaris 11.4, and Solaris 11.3/x86 isn't >> affected as well. I'm still determining what the best course of action >> is: disable string merging support before Solaris 11.4 or enable the >> workaround above instead. > > Out of curiosity, why isn't it necessary

Re: [PATCHv2] Handle not explicitly zero terminated strings in merge sections

2018-10-10 Thread Eric Botcazou
> Looking at the .rodata.str1.4 section, I see > > $ objdump -s -j .rodata.str1.8 allocatable_function_5.exe > > allocatable_function_5.exe: file format elf32-sparc-sol2 > > Contents of section .rodata.str1.8: > 10ba8 6d666f6f 2063616c 6c696e67 2000 mfoo calling ... > 10bb8 666f6f00

Re: [PATCHv2] Handle not explicitly zero terminated strings in merge sections

2018-10-10 Thread Rainer Orth
Hi Eric, >> Which version exactly (pkg list entire) of Solaris 11 are you running? >> I'm using gas 2.31 and /bin/ld on Solaris 11.4 resp. 11.5 Beta, where >> Bernd's patch in PR bootstrap/87551 fixed the remaining regressions. > > Solaris 11.3 with Gas 2.30. I could now reproduce the

Re: [PATCHv2] Handle not explicitly zero terminated strings in merge sections

2018-10-09 Thread Eric Botcazou
> Which version exactly (pkg list entire) of Solaris 11 are you running? > I'm using gas 2.31 and /bin/ld on Solaris 11.4 resp. 11.5 Beta, where > Bernd's patch in PR bootstrap/87551 fixed the remaining regressions. Solaris 11.3 with Gas 2.30. -- Eric Botcazou

Re: [PATCHv2] Handle not explicitly zero terminated strings in merge sections

2018-10-09 Thread Rainer Orth
Hi Bernd, >> * The merge-all-constants-2.c test doesn't FAIL on Solaris/SPARC with >>/bin/as, although it lacks string merging support, too. The assembler >>output contains >> >> .section".rodata" >> >>so the pattern currently used to check for .rodata is too >>

Re: [PATCHv2] Handle not explicitly zero terminated strings in merge sections

2018-10-09 Thread Bernd Edlinger
On 10/03/18 18:31, Jeff Law wrote: >> - && (len = int_size_in_bytes (TREE_TYPE (decl))) > 0 >> - && TREE_STRING_LENGTH (decl) >= len) >> + && (len = int_size_in_bytes (TREE_TYPE (decl))) >= 0 >> + && TREE_STRING_LENGTH (decl) == len) > Not sure why you want to test for >= 0

Re: [PATCHv2] Handle not explicitly zero terminated strings in merge sections

2018-10-09 Thread Rainer Orth
Hi Eric, >> Besides, the patch seems to have produced more fallout on Solaris: I see >> many new Go testsuite failures on Solaris 10 which probably are related, >> and Solaris bootstrap with Ada included is broken due to the extended >> usage of string merging. I'm currently investigating what's

Re: [PATCHv2] Handle not explicitly zero terminated strings in merge sections

2018-10-08 Thread Eric Botcazou
> Besides, the patch seems to have produced more fallout on Solaris: I see > many new Go testsuite failures on Solaris 10 which probably are related, > and Solaris bootstrap with Ada included is broken due to the extended > usage of string merging. I'm currently investigating what's going on >

Re: [PATCHv2] Handle not explicitly zero terminated strings in merge sections

2018-10-08 Thread Bernd Edlinger
On 10/08/18 13:14, Rainer Orth wrote: > Hi Bernd, > >> On 10/05/18 20:15, Andreas Schwab wrote: >>> On Sep 14 2018, Bernd Edlinger wrote: >>> diff -Npur gcc/testsuite/gnat.dg/string_merge1.adb gcc/testsuite/gnat.dg/string_merge1.adb --- gcc/testsuite/gnat.dg/string_merge1.adb

Re: [PATCHv2] Handle not explicitly zero terminated strings in merge sections

2018-10-08 Thread Rainer Orth
Hi Bernd, > Besides, the patch seems to have produced more fallout on Solaris: I see > many new Go testsuite failures on Solaris 10 which probably are related, > and Solaris bootstrap with Ada included is broken due to the extended > usage of string merging. I'm currently investigating what's

Re: [PATCHv2] Handle not explicitly zero terminated strings in merge sections

2018-10-08 Thread Rainer Orth
Hi Bernd, > On 10/05/18 20:15, Andreas Schwab wrote: >> On Sep 14 2018, Bernd Edlinger wrote: >> >>> diff -Npur gcc/testsuite/gnat.dg/string_merge1.adb >>> gcc/testsuite/gnat.dg/string_merge1.adb >>> --- gcc/testsuite/gnat.dg/string_merge1.adb 1970-01-01 >>> 01:00:00.0 +0100 >>> +++

Re: [PATCHv2] Handle not explicitly zero terminated strings in merge sections

2018-10-05 Thread Bernd Edlinger
On 10/05/18 20:15, Andreas Schwab wrote: > On Sep 14 2018, Bernd Edlinger wrote: > >> diff -Npur gcc/testsuite/gnat.dg/string_merge1.adb >> gcc/testsuite/gnat.dg/string_merge1.adb >> --- gcc/testsuite/gnat.dg/string_merge1.adb 1970-01-01 01:00:00.0 >> +0100 >> +++

Re: [PATCHv2] Handle not explicitly zero terminated strings in merge sections

2018-10-05 Thread Andreas Schwab
On Sep 14 2018, Bernd Edlinger wrote: > diff -Npur gcc/testsuite/gnat.dg/string_merge1.adb > gcc/testsuite/gnat.dg/string_merge1.adb > --- gcc/testsuite/gnat.dg/string_merge1.adb 1970-01-01 01:00:00.0 > +0100 > +++ gcc/testsuite/gnat.dg/string_merge1.adb 2018-08-26

Re: [PATCHv2] Handle not explicitly zero terminated strings in merge sections

2018-10-03 Thread Jeff Law
On 9/14/18 12:39 PM, Bernd Edlinger wrote: > Hi, > > this is an upate of the string-merge section, it is based on the V2-STRING_CST > semantic patch series, which was finally installed yesterday. > It merges single-byte string constants with or without terminating NUL. > The patch has the same

Re: [PATCHv2] Handle not explicitly zero terminated strings in merge sections

2018-09-21 Thread Jakub Jelinek
On Fri, Sep 21, 2018 at 11:36:53AM +, Bernd Edlinger wrote: > are your concerns addressed with this answer, or do you have objections > to this patch? No objections, but no time to review your patch either right now. Jakub

Re: [PATCHv2] Handle not explicitly zero terminated strings in merge sections

2018-09-21 Thread Bernd Edlinger
Hi Jakub, are your concerns addressed with this answer, or do you have objections to this patch? Thanks Bernd. On 09/14/18 21:06, Bernd Edlinger wrote: > On 09/14/18 21:01, Jakub Jelinek wrote: >> On Fri, Sep 14, 2018 at 06:39:38PM +, Bernd Edlinger wrote: >>> Hi, >>> >>> this is an upate

Re: [PATCHv2] Handle not explicitly zero terminated strings in merge sections

2018-09-14 Thread Bernd Edlinger
On 09/14/18 21:01, Jakub Jelinek wrote: > On Fri, Sep 14, 2018 at 06:39:38PM +, Bernd Edlinger wrote: >> Hi, >> >> this is an upate of the string-merge section, it is based on the >> V2-STRING_CST >> semantic patch series, which was finally installed yesterday. >> It merges single-byte string

Re: [PATCHv2] Handle not explicitly zero terminated strings in merge sections

2018-09-14 Thread Jakub Jelinek
On Fri, Sep 14, 2018 at 06:39:38PM +, Bernd Edlinger wrote: > Hi, > > this is an upate of the string-merge section, it is based on the V2-STRING_CST > semantic patch series, which was finally installed yesterday. > It merges single-byte string constants with or without terminating NUL. > The

[PATCHv2] Handle not explicitly zero terminated strings in merge sections

2018-09-14 Thread Bernd Edlinger
Hi, this is an upate of the string-merge section, it is based on the V2-STRING_CST semantic patch series, which was finally installed yesterday. It merges single-byte string constants with or without terminating NUL. The patch has the same Ada and C test cases that were already in the V1 patch.