repo.or.cz
/
official-gcc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
PR tree-optimization/86415 - strlen() not folded for substrings within constant arrays
[official-gcc.git]
/
gcc
/
testsuite
/
gnat.dg
/
overflow_sum3.adb
blob
d10784310ae43e31e9e6a3a8893f9e13945a5cbb
1
-- { dg-do run }
2
-- { dg-options "-gnato" }
3
4
procedure
Overflow_Sum3
is
5
6
function
Ident
(
I
:
Integer
)
return
Integer
is
7
begin
8
return
I
;
9
end
;
10
11
X
:
Short_Short_Integer
:=
Short_Short_Integer
(
Ident
(
127
));
12
13
begin
14
if
X
+
1
<=
127
then
15
raise
Program_Error
;
16
end if
;
17
exception
18
when
Constraint_Error
=>
null
;
19
end
;