Fixes Crash During Unnesting With Qualified Bounds
Fixes a crash in the Ada compiler that occurred during unnesting when dealing with qualified bounds, specifically for package entities.
This commit resolves a crash in the Ada compiler that occurred during the unnesting process when qualified bounds were present. The crash was due to accessing the Activation_Record_Component field for an E_Package entity, which does not contain this field. The fix prevents the compiler from attempting to access this invalid field for packages, resolving the crash.
In Details
During unnesting in GNAT, the compiler transforms nested subprograms. This commit fixes a crash in exp_unst.adb where Note_Uplevel_Bound_Trav incorrectly accessed Activation_Record_Component for E_Package entities. A developer outside the Ada front-end might miss this as it relates to specific data structures during a specific transformation phase.
For Context
This commit addresses a bug in the Ada compiler that caused it to crash under certain conditions. Specifically, the crash happened when the compiler was processing nested code structures and encountered a package (a way to group related code) with defined boundaries. The fix ensures that the compiler correctly handles these situations, preventing unexpected crashes and improving the overall stability of the compilation process.