[Ada] Crash with declare expression used in a postcondition
authorArnaud Charlet <charlet@adacore.com>
Thu, 3 Dec 2020 15:06:47 +0000 (10:06 -0500)
committerPierre-Marie de Rodat <derodat@adacore.com>
Wed, 28 Apr 2021 09:38:04 +0000 (05:38 -0400)
commitff683f9f0341391253eef171890f1b98f18ec99d
tree1574b25474bb0dbc8d01b42679ba42017f8ea95d
parentdf5f901ce89cdbf73ae827ee528da776cbcacfac
[Ada] Crash with declare expression used in a postcondition

gcc/ada/

* sem_aux.adb (Is_Limited_Type): Fix logic to check Is_Type
before assuming Ent is a typo.
* sem_ch4.adb (Analyze_Expression_With_Actions): Update
comments, minor reformatting.
* sem_res.adb (Resolve_Declare_Expression): Add protection
against no type.
gcc/ada/sem_aux.adb
gcc/ada/sem_ch4.adb
gcc/ada/sem_res.adb