gcc/testsuite/gnat.dg/predicate4.adb
raw| 1 | -- { dg-do compile } |
| 2 | -- { dg-options "-gnata" } |
| 3 | |
| 4 | with System.Assertions; use System.Assertions; |
| 5 | with Predicate4_Pkg; |
| 6 | procedure Predicate4 is |
| 7 | type V is new Float; |
| 8 | package MXI2 is new Predicate4_Pkg (V); |
| 9 | use MXI2; |
| 10 | OK : Lt := (Has => False); |
| 11 | begin |
| 12 | declare |
| 13 | Wrong : Lt := (Has => True, MX => 3.14); |
| 14 | begin |
| 15 | raise Program_Error; |
| 16 | end; |
| 17 | exception |
| 18 | when Assert_Failure => null; |
| 19 | end; |