]> git.ipfire.org Git - thirdparty/gcc.git/commit
Fix checking failure in IPA-SRA
authorEric Botcazou <ebotcazou@adacore.com>
Fri, 4 Dec 2020 09:04:56 +0000 (10:04 +0100)
committerEric Botcazou <ebotcazou@adacore.com>
Fri, 4 Dec 2020 09:09:14 +0000 (10:09 +0100)
commit260f5da0955e4678bf4b659569ed1870976f1f67
treee99786eac91cf502615bfc7624b8e26cdad0167d
parenta3b69dbf8d985284eb306ef55a5809074b6a5839
Fix checking failure in IPA-SRA

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 in some cases.

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

gcc/testsuite/ChangeLog:
* gnat.dg/opt91.ads, gnat.dg/opt91.adb: New test.
* gnat.dg/opt91_pkg.ads, gnat.dg/opt91_pkg.adb: New helper.
gcc/ipa-sra.c
gcc/testsuite/gnat.dg/opt91.adb [new file with mode: 0644]
gcc/testsuite/gnat.dg/opt91.ads [new file with mode: 0644]
gcc/testsuite/gnat.dg/opt91_pkg.adb [new file with mode: 0644]
gcc/testsuite/gnat.dg/opt91_pkg.ads [new file with mode: 0644]