gnu/gcc/64ed4d7329498a47f7dc3833708aaed4f24aecfa ada: Adjust translation of non-stored discriminants of tagged subtypes
This changes the translation of non-stored discriminants of tagged subtypes
from the (stored) discriminants of the ultimate ancestor to the (non-stored)
discriminants of the tagged type, for the sake of tagged extensions.
This also contains a code layout tweak to gnat_to_gnu_entity and a minor
improvement to gnat_to_gnu.
gcc/ada/ChangeLog:
* gcc-interface/decl.cc (gnat_to_gnu_entity) <E_Record_Subtype>: Do
not repeat conditions in chained tests.
(copy_and_substitute_in_layout): For a tagged subtype, inherit the
non-stored dicriminants from the old type explicitely.
* gcc-interface/trans.cc (gnat_to_gnu): Exclude more contexts for
the transformation of boolean rvalues.
2 files changed