On 3/26/19 4:49 PM, Rainer Orth wrote: > Hi Jakub, > >> On Mon, Mar 25, 2019 at 11:41:35AM -0600, Jeff Law wrote: >>>> PR c/89812 - incorrect maximum in error: requested alignment >>>> ‘536870912’ exceeds maximum 2147483648 >>>> >>>> gcc/c-family/ChangeLog: >>>> >>>> PR c/89812 >>>> * c-common.c (check_user_alignment): Rename local. Correct maximum >>>> alignment in diagnostic. Avoid assuming argument fits in SHWI, >>>> convert it to UHWI when it fits. >>>> >>>> gcc/testsuite/ChangeLog: >>>> >>>> PR c/89812 >>>> * gcc.dg/attr-aligned-3.c: New test. >>> OK >> >> The test FAILs on all 32-bit targets (where __UINT64_TYPE__ is unsigned long >> long) due to -pedantic-errors, and I bet will fail on all non-ELF targets on >> AVR, because only config/elfos.h defines 1 << 28 as MAX_OFILE_ALIGNMENT (in >> bytes) and the test relies on exactly that value, nothing else. >> >> Fixed thusly, tested on x86_64-linux (-m32/-m64), ok for trunk? >> >> If we have some elf targets that still don't use elfos.h, we might need to >> add them next to avr too. > > FWIW, adding *-*-solaris2.* to the target list lets the test also PASS > on i386-pc-solaris2.11 and sparc-sun-solaris2.11 (32 and 64-bit each). Go for it. And ISTM that this kind of change should be well within the space where you should be able to commit w/o approvals :-)
jeff