[Ada] Reject illegal syntax in pragma Contract_Cases
authorPiotr Trojanek <trojanek@adacore.com>
Fri, 4 Sep 2020 12:51:02 +0000 (14:51 +0200)
committerPierre-Marie de Rodat <derodat@adacore.com>
Fri, 23 Oct 2020 08:25:04 +0000 (04:25 -0400)
commit48d0e61abad5d617205cddb6919c8f4ecc29c229
tree909784bf7803a364eaee448688a29990289c7d9a
parent973c7b7e5460866099ba3904ae29808674604f0e
[Ada] Reject illegal syntax in pragma Contract_Cases

gcc/ada/

* contracts.adb (Analyze_Entry_Or_Subprogram_Contract,
Analyze_Subprogram_Body_Stub_Contract): Fix missing references
to Subprogram_Variant where similar references to Contract_Cases
are present.
* sem_prag.adb (Analyze_Contract_Case, Analyze_Variant): Check
that aggregate parameter has no expressions.
(Analyze_Pragma): Replace Contract_Cases with Subprogram_Variant
in a copy-pasted comment.
gcc/ada/contracts.adb
gcc/ada/sem_prag.adb