Reinstate generic stack checking warning with LRA

Eric Botcazou ebotcazou@adacore.com
Tue Mar 1 20:05:00 GMT 2016


When stack checking is entirely done by the middle-end (default if no specific 
back-end support or forced by -fstack-check=generic), the checking for the 
prologue is actually done in the caller with a default range and the hope is 
that the callee's static frame is not too large...  There are a few tricks to 
make it sort of work, but it's obviously not bullet proof so a warning will be 
issued in the problematic cases (lot of small variables).

But it is issued at the end of reload and LRA didn't replicate it, so it will 
no longer be issued e.g. for s390, as seen under PR ada/70017.  Therefore the 
attached patch moves it to the end of do_reload and also streamlines it a bit.

Tested on x86_64-suse-linux, applied on the mainline as obvious.


2016-03-01  Eric Botcazou  <ebotcazou@adacore.com>

	PR ada/70017
	* ira.c (do_reload): Issue warning for generic stack checking here...
	* reload1.c (reload): ...instead of here and streamline it.


2016-03-01  Eric Botcazou  <ebotcazou@adacore.com>

	* gcc.dg/pr70017.c: New test.

-- 
Eric Botcazou
-------------- next part --------------
A non-text attachment was scrubbed...
Name: p.diff
Type: text/x-patch
Size: 2242 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20160301/1b3cb964/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pr70017.c
Type: text/x-csrc
Size: 558 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20160301/1b3cb964/attachment-0001.bin>


More information about the Gcc-patches mailing list