diff options
author | Eric Botcazou <ebotcazou@adacore.com> | 2020-09-11 10:41:28 +0200 |
---|---|---|
committer | Eric Botcazou <ebotcazou@adacore.com> | 2020-09-11 10:43:38 +0200 |
commit | 7c919c12be147c72e5d7ef2f9436adadcf2c2f24 (patch) | |
tree | 9bc31f147ed1158535d5d72e82926865f8c38833 /gcc/ada/gcc-interface/misc.c | |
parent | e898facaf3cceb6c31bd34511b117c907b18a3e9 (diff) | |
download | gcc-7c919c12be147c72e5d7ef2f9436adadcf2c2f24.zip gcc-7c919c12be147c72e5d7ef2f9436adadcf2c2f24.tar.gz gcc-7c919c12be147c72e5d7ef2f9436adadcf2c2f24.tar.bz2 |
Fix crash on array component with nonstandard index type
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.
gcc/ada/ChangeLog:
* gcc-interface/decl.c (gnat_to_gnu_entity) <E_Array_Subtype>: 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.
gcc/testsuite/ChangeLog:
* gnat.dg/specs/discr7.ads: New test.
Diffstat (limited to 'gcc/ada/gcc-interface/misc.c')
0 files changed, 0 insertions, 0 deletions