Hi Jeff,
> 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 :-)
I know and meant to install the patch unless Jakub incorporated it into
his. However, I preferred to leave approval of his patch to a
subject-matter expert which hadn't happened by the time I sent my comment :-)
Here's what I've installed now.
Rainer
--
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University
2019-03-31 Rainer Orth <[email protected]>
* gcc.dg/attr-aligned-3.c: Enable on *-*-solaris2.*.
# HG changeset patch
# Parent 69acafd998407cc8b114107b6cefd6fdb5e5d369
Enable gcc.dg/attr-aligned-3.c on Solaris
diff --git a/gcc/testsuite/gcc.dg/attr-aligned-3.c b/gcc/testsuite/gcc.dg/attr-aligned-3.c
--- a/gcc/testsuite/gcc.dg/attr-aligned-3.c
+++ b/gcc/testsuite/gcc.dg/attr-aligned-3.c
@@ -2,7 +2,7 @@
exceeds maximum 2147483648
Limit to ELF targets that are known to use MAX_OFILE_ALIGNMENT
(1 << 28) * BITS_PER_UNIT.
- { dg-do compile { target { { *-*-elf* *-*-gnu* } && { ! avr*-*-* } } } }
+ { dg-do compile { target { { *-*-elf* *-*-gnu* *-*-solaris2.* } && { ! avr*-*-* } } } }
{ dg-require-effective-target size32plus }
{ dg-options "" } */