On 3/26/19 9:29 AM, Jakub Jelinek wrote:
> 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.
> 
> 2019-03-26  Jakub Jelinek  <ja...@redhat.com>
> 
>       PR c/89812
>       * gcc.dg/attr-aligned-3.c: Limit the test to known ELF targets
>       other than AVR.  Add dg-options "".
OK.
Jeff

Reply via email to