Ada: Fix segfault on mutually recursive record type declarations
This was reported a long time ago and is again a fairly pathological case,
but it turns out to be unfixable with the current model of type freezing
in GNAT (which is the second one suggested in the AARM 13.14(19.i) clause).
The code is legal but, as the declaration of any object of the types will
exhaust the heap and eventually raise Storage_Error, it is totally useless.
The patch contains a small cleanup in a related area as well as the addition
of a commented assertion in gigi, so that the compiler shuts down properly.
gcc/ada/
PR ada/15800
* freeze.adb (Freeze_Entity.Freeze_Record_Type): Small cleanup
in code and comments.
* gcc-interface/utils.cc (create_field_decl): Assert that the type
of the field is frozen at this point.