Add limit for maximal alignment options (PR c/84310).
authorMartin Liska <mliska@suse.cz>
Tue, 20 Feb 2018 10:04:13 +0000 (11:04 +0100)
committerMartin Liska <marxin@gcc.gnu.org>
Tue, 20 Feb 2018 10:04:13 +0000 (10:04 +0000)
commit5bbccd92506c4d260eca29d12fa30c75aaaee65b
treee8b704768df9cda9cb173b4b741372e31194f039
parent0b2513e292a70d715affbe4a9b5af6672fcf99b3
Add limit for maximal alignment options (PR c/84310).

2018-02-20  Martin Liska  <mliska@suse.cz>

PR c/84310
PR target/79747
* final.c (shorten_branches): Build align_tab array with one
more element.
* opts.c (finish_options): Add alignment option limit check.
(MAX_CODE_ALIGN): Likewise.
(MAX_CODE_ALIGN_VALUE): Likewise.
* doc/invoke.texi: Document maximum allowed option value for
all -falign-* options.
2018-02-20  Martin Liska  <mliska@suse.cz>

PR c/84310
PR target/79747
* gcc.target/i386/pr84310.c: New test.
* gcc.target/i386/pr84310-2.c: Likewise.

From-SVN: r257842
gcc/ChangeLog
gcc/doc/invoke.texi
gcc/final.c
gcc/opts.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/i386/pr84310-2.c [new file with mode: 0644]
gcc/testsuite/gcc.target/i386/pr84310.c [new file with mode: 0644]