[Ada] Crash on derived type with rep. clause and renamed discriminant
authorEd Schonberg <schonberg@adacore.com>
Fri, 8 May 2020 13:27:24 +0000 (09:27 -0400)
committerPierre-Marie de Rodat <derodat@adacore.com>
Mon, 6 Jul 2020 11:35:12 +0000 (07:35 -0400)
commite3bf5e2ef3d08a1fac9db2b5f0a1f107b25d67c5
tree56ccc83430de9e8a57a75ff600c8f1284dfbc933
parentce16f54f6edf9c440046f6dd454e1dcbbb1ffae3
[Ada] Crash on derived type with rep. clause and renamed discriminant

gcc/ada/

* exp_ch5.adb (Find_Component): If the target type is a derived
record type and the required component is a discriminant that is
renamed in the derived type declaration, use the name of the
original discriminant to locate the intended target component.
gcc/ada/exp_ch5.adb