This is a regression present on mainline, 10 and 9 branches: the compiler goes into an infinite recursion eventually exhausting the stack for the declaration of a discriminated record type with an array component having a discriminant as bound and an index type that is an enumeration type with a non-standard representation clause. Tested on x86_64-suse-linux, applied on the mainline, 10 and 9 branches. 2020-09-11 Eric Botcazou * gcc-interface/decl.c (gnat_to_gnu_entity) : Only create extra subtypes for discriminants if the RM size of the base type of the index type is lower than that of the index type. 2020-09-11 Eric Botcazou * gnat.dg/specs/discr7.ads: New test. -- Eric Botcazou