]> git.ipfire.org Git - thirdparty/gcc.git/commit
[Ada] Crash on improper use of GNAT attribute Type_Key
authorEd Schonberg <schonberg@adacore.com>
Thu, 12 Aug 2021 14:39:21 +0000 (10:39 -0400)
committerPierre-Marie de Rodat <derodat@adacore.com>
Fri, 1 Oct 2021 06:13:38 +0000 (06:13 +0000)
commit1c37d1960adf1c30fa700b89d588182c84f8f22d
treeb9b460c44b739fc259cadfc2d07c7fe05a3872b2
parent10ca293141e0e8178de6d68473bd2ac607c6348b
[Ada] Crash on improper use of GNAT attribute Type_Key

gcc/ada/

* sem_attr.adb (Analyze_Attribute, case Type_Key): Attribute can
be applied to a formal type.
* sem_ch5.adb (Analyze_Case_Statement): If Extensions_Allowed is
not enabled, verify that the type of the expression is discrete.
gcc/ada/sem_attr.adb
gcc/ada/sem_ch5.adb