PR c/89812 - incorrect maximum in error: requested alignment '536870912' exceeds...
authorMartin Sebor <msebor@redhat.com>
Mon, 25 Mar 2019 22:56:40 +0000 (22:56 +0000)
committerMartin Sebor <msebor@gcc.gnu.org>
Mon, 25 Mar 2019 22:56:40 +0000 (16:56 -0600)
commit0c9992c8b5e07e7295c8be65586a2a82e7f191e5
tree9d606885c33689f567cb979e674488195d67d6e2
parent3f9a6608899dbbe22f98ef7c42937d2729864f85
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.

From-SVN: r269927
gcc/ChangeLog
gcc/c-family/c-common.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/attr-aligned-3.c [new file with mode: 0644]