When discovering violation of the No_Elaboration_Code restriction it is enough to find one unit that violates it; we don't need to examine all units. Code cleanup; semantics is unaffected. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * lib-writ.adb (Write_ALI): Exit from loop after seeing first unit that violates No_Elaboration_Code restriction.