gcc/testsuite/gnat.dg/frame_overflow2.adb
raw| 1 | -- { dg-do compile } |
| 2 | |
| 3 | with System; |
| 4 | |
| 5 | procedure Frame_Overflow2 is -- { dg-error "total size of local objects is too large" } |
| 6 | |
| 7 | type Index_T is range 1 .. 2**(System.Word_Size - 1) - 1; |
| 8 | |
| 9 | type SetArray is array (Index_T) of Boolean; |
| 10 | |
| 11 | type Set is record |
| 12 | Store: SetArray := (Others => False); |
| 13 | end record; |
| 14 | |
| 15 | Phi: constant Set := (Store => (Others => False)); |
| 16 | |
| 17 | function F return Set is |
| 18 | begin |
| 19 | return Phi; |
| 20 | end; |
| 21 | |
| 22 | begin |
| 23 | null; |
| 24 | end; |