The -gnatyr switch is supposed to generate a style warning if the case of a usage name does not match that of the defining_identifier it denotes. The warning was missing for component names appearing in record representation clauses; this patch fixes that bug. Tested on x86_64-pc-linux-gnu, committed on trunk gcc/ada/ * sem_ch13.adb (Analyze_Record_Representation_Clause): Call Set_Entity_With_Checks instead of Set_Entity, so we perform the check for correct casing. * style.adb (Check_Identifier): Minor comment improvement. Cleanup overly complicated code.