File tree Expand file tree Collapse file tree 4 files changed +28
-0
lines changed
testsuite/gnat2goto/tests/separate_subprog Expand file tree Collapse file tree 4 files changed +28
-0
lines changed Original file line number Diff line number Diff line change 1+ separate (P)
2+ procedure Inc (N : in out Integer) is
3+ Old_N : constant Integer := N;
4+ begin
5+ N := N + 1;
6+ pragma Assert (N = Old_N + 1);
7+ end Inc;
Original file line number Diff line number Diff line change 1+ -- Use *.asu file extension for a subunit so that it is not included as a
2+ -- a top level unit to be analysed using by the regression test system.
3+ -- The gnat front-end will automatically analyse the subunit when it
4+ -- encounters the sybprogram_body_stub.
5+ pragma Source_File_Name (
6+ Subunit_File_Name => " *.asu" ,
7+ Dot_Replacement => " -" );
8+
9+ procedure P (X : in out integer) is
10+ procedure Inc (N : in out Integer) is separate ;
11+ Old_X : constant Integer := X;
12+ begin
13+ Inc (X);
14+ pragma Assert (X = Old_X + 1 );
15+ end P ;
Original file line number Diff line number Diff line change 1+ [2] file p-inc.asu line 6 assertion: SUCCESS
2+ [1] file p.adb line 14 assertion: FAILURE
3+ VERIFICATION FAILED
Original file line number Diff line number Diff line change 1+ from test_support import *
2+
3+ prove ()
You can’t perform that action at this time.
0 commit comments