[Ada] Missing error on generic type with representation clause
commitc7854dbd0fedde0bb15e56cc9b4f120d80f3ef41
authorJavier Miranda <miranda@adacore.com>
Tue, 9 Jul 2019 07:54:45 +0000 (9 07:54 +0000)
committerPierre-Marie de Rodat <pmderodat@gcc.gnu.org>
Tue, 9 Jul 2019 07:54:45 +0000 (9 07:54 +0000)
tree91b19dfd69b6241254c3016b24f4b857e88b0942
parent134f52b9c4f45076efe6a3c345e6e01e95998cc1
[Ada] Missing error on generic type with representation clause

The compiler does not report an error on a generic type that has a
representation clause when its ultimate parent is not a generic formal.

2019-07-09  Javier Miranda  <miranda@adacore.com>

gcc/ada/

* sem_ch13.adb (Rep_Item_Too_Early): Representation clauses are
not allowed for a derivation of a generic type. Extend the
current test to check that none of the parents is a generic
type.

gcc/testsuite/

* gnat.dg/rep_clause8.adb: New testcase.

From-SVN: r273283
gcc/ada/ChangeLog
gcc/ada/sem_ch13.adb
gcc/testsuite/ChangeLog
gcc/testsuite/gnat.dg/rep_clause8.adb [new file with mode: 0644]