[PATCH] testsuite: Fix up pr25376.c on powerpc64-linux and array-quals-1.c on powerpc-linux [PR98325]

Segher Boessenkool segher@kernel.crashing.org
Thu Feb 4 21:24:19 GMT 2021


Hi!

On Thu, Feb 04, 2021 at 09:26:47PM +0100, Jakub Jelinek wrote:
> On Mon, Nov 16, 2020 at 06:14:52PM -0500, David Edelsohn via Gcc-patches wrote:
> > Jenkins does function on AIX.  I will take an action item to create
> > another LPAR on the AIX systems at OSUOSL for Jenkins and coordinate
> > with you to connect it to the terrific Jenkins infrastructure for GCC
> > that you have deployed.
> 
> The following patch fixes the pr25376.c testcase on powerpc64-linux
> and array-quals-1.c on powerpc-linux.
> Previously it failed like:
> FAIL: gcc.dg/array-quals-1.c scan-assembler-symbol-section symbol ^_?a1\$ (found a1) has section ^\\\\.(const|rodata|srodata)|\\\\[RO\\\\] (found .sdata)
> FAIL: gcc.dg/array-quals-1.c scan-assembler-symbol-section symbol ^_?b1\$ (found b1) has section ^\\\\.(const|rodata|srodata)|\\\\[RO\\\\] (found .sdata)
> FAIL: gcc.dg/array-quals-1.c scan-assembler-symbol-section symbol ^_?c1\$ (found c1) has section ^\\\\.(const|rodata|srodata)|\\\\[RO\\\\] (found .sdata)
> FAIL: gcc.dg/array-quals-1.c scan-assembler-symbol-section symbol ^_?d1\$ (found d1) has section ^\\\\.(const|rodata|srodata)|\\\\[RO\\\\] (found .sdata)
> FAIL: gcc.dg/array-quals-1.c scan-assembler-symbol-section symbol ^_?p\$ (found p) has section ^\\\\.(const|rodata|srodata)|\\\\[RW\\\\] (found .sdata)
> FAIL: gcc.dg/array-quals-1.c scan-assembler-symbol-section symbol ^_?p1\$ (found p1) has section ^\\\\.(const|rodata|srodata)|\\\\[RW\\\\] (found .sdata)
> FAIL: gcc.dg/array-quals-1.c scan-assembler-symbol-section symbol ^_?q\$ (found q) has section ^\\\\.(const|rodata|srodata)|\\\\[RW\\\\] (found .sdata)
> FAIL: gcc.dg/array-quals-1.c scan-assembler-symbol-section symbol ^_?q1\$ (found q1) has section ^\\\\.(const|rodata|srodata)|\\\\[RW\\\\] (found .sdata)
> FAIL: gcc.dg/array-quals-1.c scan-assembler-symbol-section symbol ^_?r\$ (found r) has section ^\\\\.(const|rodata|srodata)|\\\\[RW\\\\] (found .sdata)
> FAIL: gcc.dg/array-quals-1.c scan-assembler-symbol-section symbol ^_?r1\$ (found r1) has section ^\\\\.(const|rodata|srodata)|\\\\[RW\\\\] (found .sdata)
> FAIL: gcc.dg/array-quals-1.c scan-assembler-symbol-section symbol ^_?s\$ (found s) has section ^\\\\.(const|rodata|srodata)|\\\\[RW\\\\] (found .sdata)
> FAIL: gcc.dg/array-quals-1.c scan-assembler-symbol-section symbol ^_?s1\$ (found s1) has section ^\\\\.(const|rodata|srodata)|\\\\[RW\\\\] (found .sdata)
> FAIL: gcc.dg/array-quals-1.c scan-assembler-symbol-section symbol ^_?t\$ (found t) has section ^\\\\.(const|rodata|srodata)|\\\\[RW\\\\] (found .sdata)
> FAIL: gcc.dg/array-quals-1.c scan-assembler-symbol-section symbol ^_?t1\$ (found t1) has section ^\\\\.(const|rodata|srodata)|\\\\[RW\\\\] (found .sdata)
> FAIL: gcc.dg/pr25376.c scan-assembler-symbol-section symbol simple\$ (found .L.simple) has section ^\\\\.?my_named_section|simple\\\\[DS\\\\]|^\\\\"\\\\.opd\\\\" (found .opd)
> FAIL: gcc.dg/pr25376.c scan-assembler-symbol-section symbol simple\$ (found simple) has section ^\\\\.?my_named_section|simple\\\\[DS\\\\]|^\\\\"\\\\.opd\\\\" (found .opd)
> 
> The problem with pr25376.c testcase are the ELFv1 function descriptors,
>         .section        my_named_section,"ax",@progbits
>         .align 2
>         .globl simple
>         .section        ".opd","aw"
>         .align 3
> simple:
>         .quad   .L.simple,.TOC.@tocbase,0
>         .previous
>         .type   simple, @function
> .L.simple:
> 
> so the simple symbol is found in the .opd section rather than in the
> my_named_section the test attempts to verify for that symbol.
> This patch deals it with two changes, the last two hunks in scanasm.exp
> teach it about the behavior of .previous directive and the first hunk
> for powerpc if symbol is in .opd section will try section in which the
> .L.symbol label is instead.
> 
> The array-quals-1.c test fails because on powerpc-linux the symbols
> are emitted into .sdata section rather than one of the expected ones.
> 
> Tested on powerpc64-linux (-m32/-m64) and x86_64-linux (-m32/-m64), ok for
> trunk?

The Tcl looks okay; whether it actually does the right thing, I do not
know :-)

> Whether this fixes also AIX, I have no idea.

Yeah me neither.  So okay for trunk, if David thinks it is okay as well.
Thanks!


Segher


More information about the Gcc-patches mailing list