[patch] Fix checking failure in IPA-SRA

Eric Botcazou botcazou@adacore.com
Thu Dec 3 19:12:04 GMT 2020


Hi,

this is a regression present on the mainline and 10 branch: on the one hand, 
IPA-SRA does *not* disqualify accesses with zero size but, on the other hand, 
it checks that accesses present in the tree have a (strictly) positive size,
thus trivially yielding an ICE, for example on the attached Ada testcase.

The attached fix relaxes the check, OK for mainline and 10 branch?


2020-12-03  Eric Botcazou  <ebotcazou@adacore.com>

	* ipa-sra.c (verify_access_tree_1): Relax assertion on the size.


2020-12-03  Eric Botcazou  <ebotcazou@adacore.com>

	* gnat.dg/opt91.ad[sb]: New test.
	* gnat.dg/opt91_pkg.ad[sb]: New helper.

-- 
Eric Botcazou
-------------- next part --------------
A non-text attachment was scrubbed...
Name: p.diff
Type: text/x-patch
Size: 409 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/gcc-patches/attachments/20201203/10cf75dc/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: opt91_pkg.adb
Type: text/x-adasrc
Size: 246 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/gcc-patches/attachments/20201203/10cf75dc/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: opt91_pkg.ads
Type: text/x-adasrc
Size: 476 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/gcc-patches/attachments/20201203/10cf75dc/attachment-0002.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: opt91.adb
Type: text/x-adasrc
Size: 203 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/gcc-patches/attachments/20201203/10cf75dc/attachment-0003.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: opt91.ads
Type: text/x-adasrc
Size: 245 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/gcc-patches/attachments/20201203/10cf75dc/attachment-0004.bin>


More information about the Gcc-patches mailing list