On Fri, 2020-05-15 at 18:26 +0100, Jozef Lawrynowicz wrote: > The attached patch fixes many GCC and G++ tests for 16-bit targets. These > targets can have the following properties: > - "int", "size_t", "ptrdiff_t", "void *" are 16-bit types > - sizeof(int) == sizeof(short) > > These properties cause problems for a number of tests in the testsuite, > where int is often assumed to be a 32-bit type (and the test relies on that > property to run as expected or to not generate any unexpected warnings). > Other failures occur when arrays larger than what is supported for 16-bit > targets are declared, or the "short" type is expected to be smaller than > "int". > > The fixes fall into a few different categories: > - Explicitly defining a 32-bit int type and using that in place of "int" or > "unsigned int". > - Skipping tests which rely on arrays sized larger than what is supported by > the > target. > - Adding or adjusting dg-{warning,error} directives > - Other testcase specific adjustments. > > I've successfully regtested the patch on x86_64-pc-linux-gnu and msp430-elf in > the default, -mlarge and -mcpu=msp430 configurations. > > There are no absolute changes to testresults on x86_64-pc-linux-gnu, but > because > of changes to the line number of dg-{warning,message,error,etc} directives, > the > results comparison shows: > UNTESTED->FAIL: 8 tests > UNTESTED->PASS: 986 tests > PASS->UNTESTED: 986 tests > FAIL->UNTESTED: 8 tests > > Across the 3 configurations for msp430, the total is: > PASS->FAIL: 0 tests > FAIL->PASS: 1108 tests > UNTESTED->FAIL: 24 tests > UNTESTED->PASS: 2924 tests > FAIL->UNTESTED: 807 tests > PASS->UNTESTED: 2564 tests > > Ok for trunk? > > What about for gcc-10 branch? It would be nice to clean up the testresults for > MSP430, but I understand if it is undesirable to cause these line number > changes > to appear on the stable branch. OK for the trunk. I suspect the release managers wouldn't want it for the branch though.
jeff