]> git.ipfire.org Git - thirdparty/gcc.git/commit - gcc/ada/ChangeLog
[Ada] Crash on precondition involving quantified expression
authorpmderodat <pmderodat@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 14 Aug 2019 09:51:00 +0000 (09:51 +0000)
committerpmderodat <pmderodat@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 14 Aug 2019 09:51:00 +0000 (09:51 +0000)
commit8e2a1f8faeb41cf064b4168faa5a06e41088eaaa
tree42d5a622c24b88563edc8a26c802e88b2146640f
parentf27aa0dc33da83d090c90a56362b8b39013345c8
[Ada] Crash on precondition involving quantified expression

This patch fixes a compiler abort on a precondition whose condition
includes a quantified expression.

2019-08-14  Ed Schonberg  <schonberg@adacore.com>

gcc/ada/

* sem_util.adb (New_Copy_Tree, Visit_Entity): A quantified
expression includes the implicit declaration of the loop
parameter. When a quantified expression is copied during
expansion, for example when building the precondition code from
the generated pragma, a new loop parameter must be created for
the new tree, to prevent duplicate declarations for the same
symbol.

gcc/testsuite/

* gnat.dg/predicate12.adb, gnat.dg/predicate12.ads: New
testcase.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@274449 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ada/ChangeLog
gcc/ada/sem_util.adb
gcc/testsuite/ChangeLog
gcc/testsuite/gnat.dg/predicate12.adb [new file with mode: 0644]
gcc/testsuite/gnat.dg/predicate12.ads [new file with mode: 0644]