| 1 |
-- { dg-options "-fprofile-arcs -ftest-coverage" } |
| 2 |
-- { dg-do run { target native } } */ |
| 3 |
|
| 4 |
procedure Check is |
| 5 |
|
| 6 |
function Add1 (I1, I2 : Integer) return Integer is |
| 7 |
begin |
| 8 |
return I1 + I2; -- count(1) |
| 9 |
end; |
| 10 |
|
| 11 |
function Add2 (I1, I2 : Integer) return Integer is |
| 12 |
pragma Suppress (Overflow_Check); |
| 13 |
begin |
| 14 |
return I1 + I2; -- count(1) |
| 15 |
end; |
| 16 |
|
| 17 |
begin |
| 18 |
if Add1 (1, 2) /= 3 then |
| 19 |
raise Program_Error; |
| 20 |
end if; |
| 21 |
|
| 22 |
if Add2 (1, 2) /= 3 then |
| 23 |
raise Program_Error; |
| 24 |
end if; |
| 25 |
end; |
| 26 |
|
| 27 |
-- { dg-final { run-gcov check.adb } } |