discr49_rec1.ads
270 Bytes
-
[Ada] Crash with private types and renamed discriminants · fbb53995
This patch fixes a compiler abort on an object declaration whose type is a private type with discriminants, and whose full view is a derived type that renames some discriminant of its parent. 2018-05-22 Ed Schonberg <schonberg@adacore.com> gcc/ada/ * sem_ch3.adb (Search_Derivation_Levels): Whenever a parent type is private, use the full view if available, because it may include renamed discriminants whose values are stored in the corresponding Stored_Constraint. gcc/testsuite/ * gnat.dg/discr49.adb, gnat.dg/discr49_rec1.adb, gnat.dg/discr49_rec1.ads, gnat.dg/discr49_rec2.adb, gnat.dg/discr49_rec2.ads: New testcase. From-SVN: r260521
Ed Schonberg committed