https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83245
Bug ID: 83245 Summary: [8 regression] several tests fail starting with r255258 Product: gcc Version: 8.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: seurer at gcc dot gnu.org Target Milestone: --- Starting with r255258 there are 5 test cases that fail on powerpc64 BE (LE is fine). > FAIL: gcc.dg/torture/stackalign/builtin-apply-2.c -Os -fpic (test for > excess errors) > FAIL: gcc.dg/torture/stackalign/builtin-return-1.c -Os -fpic (test for > excess errors) > FAIL: gfortran.dg/alloc_comp_assign_2.f90 -Os (test for excess errors) > FAIL: gfortran.dg/defined_assignment_2.f90 -Os execution test > FAIL: libgomp.fortran/allocatable9.f90 -Os (test for excess errors) They all seem to be failing for the same reason: spawn -ignore SIGHUP /home/seurer/gcc/build/gcc-bisect/gcc/testsuite/gfortran/../../gfortran -B/home/seurer/gcc/build/gcc-bisect/gcc/testsuite/gfortran/../../ -B/home/seurer/gcc/build/gcc-bisect/powerpc64-unknown-linux-gnu/./libgfortran/ /home/seurer/gcc/gcc-bisect/gcc/testsuite/gfortran.dg/alloc_comp_assign_2.f90 -fno-diagnostics-show-caret -fdiagnostics-color=never -Os -pedantic-errors -B/home/seurer/gcc/build/gcc-bisect/powerpc64-unknown-linux-gnu/./libgfortran/.libs -L/home/seurer/gcc/build/gcc-bisect/powerpc64-unknown-linux-gnu/./libgfortran/.libs -L/home/seurer/gcc/build/gcc-bisect/powerpc64-unknown-linux-gnu/./libgfortran/.libs -L/home/seurer/gcc/build/gcc-bisect/powerpc64-unknown-linux-gnu/./libatomic/.libs -B/home/seurer/gcc/build/gcc-bisect/powerpc64-unknown-linux-gnu/./libquadmath/.libs -L/home/seurer/gcc/build/gcc-bisect/powerpc64-unknown-linux-gnu/./libquadmath/.libs -L/home/seurer/gcc/build/gcc-bisect/powerpc64-unknown-linux-gnu/./libquadmath/.libs -lm -o ./alloc_comp_assign_2.exe /tmp/ccAojICz.s: Assembler messages: /tmp/ccAojICz.s:703: Error: address register in load range compiler exited with status 1 output is: /tmp/ccAojICz.s: Assembler messages: /tmp/ccAojICz.s:703: Error: address register in load range FAIL: gfortran.dg/alloc_comp_assign_2.f90 -Os (test for excess errors) Excess errors: /tmp/ccAojICz.s:703:0: Error: address register in load range spawn -ignore SIGHUP /home/seurer/gcc/build/gcc-bisect/gcc/xgcc -B/home/seurer/gcc/build/gcc-bisect/gcc/ /home/seurer/gcc/gcc-bisect/gcc/testsuite/gcc.dg/torture/stackalign/builtin-apply-2.c -fno-diagnostics-show-caret -fdiagnostics-color=never -Os -fpic -lm -o ./builtin-apply-2.exe /tmp/ccmQaGmG.s: Assembler messages: /tmp/ccmQaGmG.s:116: Error: address register in load range compiler exited with status 1 output is: /tmp/ccmQaGmG.s: Assembler messages: /tmp/ccmQaGmG.s:116: Error: address register in load range FAIL: gcc.dg/torture/stackalign/builtin-apply-2.c -Os -fpic (test for excess errors) Excess errors: /tmp/ccmQaGmG.s:116: Error: address register in load range spawn -ignore SIGHUP /home/seurer/gcc/build/gcc-bisect/gcc/xgcc -B/home/seurer/gcc/build/gcc-bisect/gcc/ /home/seurer/gcc/gcc-bisect/gcc/testsuite/gcc.dg/torture/stackalign/builtin-return-1.c -fno-diagnostics-show-caret -fdiagnostics-color=never -Os -fpic -lm -o ./builtin-return-1.exe /tmp/ccbLTFT6.s: Assembler messages: /tmp/ccbLTFT6.s:112: Error: address register in load range compiler exited with status 1 output is: /tmp/ccbLTFT6.s: Assembler messages: /tmp/ccbLTFT6.s:112: Error: address register in load range FAIL: gcc.dg/torture/stackalign/builtin-return-1.c -Os -fpic (test for excess errors) Excess errors: /tmp/ccbLTFT6.s:112: Error: address register in load range Looking in detail at builtin-apply-2.s line 116 is: lswi 5,9,0 The previous revision used r4 here instead of r9. r9 is in the range of registers that lswi is loading so the instruction is invalid. Load String Word Immediate lswi RT,RA,NB Let the effective address (EA) be (RA|0). Let n = NB if NB≠0, n = 32 if NB=0; n is the number of bytes to load. Let nr=CEIL(n/4); nr is the number of registers to receive data. n consecutive bytes starting at EA are loaded into GPRs RT through RT+nr-1. If RA is in the range of registers to be loaded, including the case in which RA=0, the instruction form is invalid. seurer@makalu-lp1:~/gcc/build/gcc-test$ diff builtin-apply-2.s.255257 builtin-apply-2.s.255258 33c33 < stdu 1,-832(1) --- > stdu 1,-816(1) 51d50 < std 3,56(31) 52a52 > std 3,56(31) 66c66,67 < addi 3,31,880 --- > addi 3,31,864 > addi 4,31,48 103,104d103 < addi 9,31,48 < std 9,672(31) 106d104 < std 9,592(31) 107a106 > std 9,592(31) 111,112c110,111 < mr 4,0 < addi 0,31,912 --- > mr 9,0 > addi 0,31,896 114,115c113,114 < stswi 5,4,0 < mr 4,0 --- > stswi 5,9,0 > mr 9,0 117c116 < lswi 5,4,0 --- > lswi 5,9,0 119c118,125 < ld 10,672(31) --- > mr 10,4 > ld 11,608(31) > ld 3,8(4) > ld 5,24(10) > ld 6,32(10) > ld 7,40(10) > ld 8,48(10) > ld 9,56(10) 122a129,130 > ld 4,16(4) > ld 10,64(10) 126,132d133 < ld 3,8(10) < ld 4,16(10) < ld 5,24(10) < ld 6,32(10) < ld 7,40(10) < ld 8,48(10) < ld 9,56(10) 134d134 < ld 10,64(10) 145d144 < ld 11,608(31) 174c173 < addi 1,31,832 --- > addi 1,31,816 228c227 < .ident "GCC: (GNU) 8.0.0 20171129 (experimental) [trunk revision 255257]" --- > .ident "GCC: (GNU) 8.0.0 20171129 (experimental) [trunk revision > 255258]"