This moves the inline expansion for user-defined enumeration types back into the normal flow of control, moves the declarations of local objects to where they are needed and removes an explicit check for private types in the enumeration case, which is now superfluous. No functional changes. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * exp_imgv.adb (Is_User_Defined_Enumeration_Type): Delete. (Expand_Image_Attribute): Move inline expansion into normal flow of control, move down declarations and remove superfluous processing.