[PATCH] Add limit for maximal alignment options (PR c/84310).

Jakub Jelinek jakub@redhat.com
Tue Feb 20 08:43:00 GMT 2018


On Mon, Feb 12, 2018 at 01:09:43PM +0100, Martin Liška wrote:
> Following patch fixes 2 issues with -falign-*:
> 1) when using -malign-x=16 (or corresponding -falign-* value) then ICE appeared
> as code in final.c can deal just with limited alignment.
> 2) thus I also documented and limited the maximum value of -falign-* options.
> 
> Patch can bootstrap on ppc64le-redhat-linux and survives regression tests.
> i386.exp test-suite works fine on x86_64 machine.
> 
> Ready to be installed?
> Martin
> 
> gcc/ChangeLog:
> 
> 2018-02-09  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.
> 
> gcc/testsuite/ChangeLog:
> 
> 2018-02-12  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.

Ok, thanks.

	Jakub



More information about the Gcc-patches mailing list