In some cases where the size computation for an object declaration will unconditionally overflow, the FE generates code to raise Storage_Error at the point of the object declaration (and may generate an associated warning). Don't do this if the object declaration is an ignored (i.e., disabled) ghost declaration. Tested on x86_64-pc-linux-gnu, committed on trunk 2019-09-18 Steve Baird gcc/ada/ * freeze.adb (Freeze_Object_Declaration): Do not call Check_Large_Modular_Array when the object declaration being frozen is an ignored ghost entity. gcc/testsuite/ * gnat.dg/ghost7.adb, gnat.dg/ghost7.ads: New testcase.