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 target/55146
[official-gcc.git]
/
gcc
/
testsuite
/
gcc.dg
/
ftrapv-3.c
blob
e23059a078ca13737c5c5462b6817a11d959e673
1
/* { dg-do run } */
2
/* { dg-options "-ftrapv" } */
3
4
extern
void
abort
(
void
);
5
unsigned long
6
foo
(
long
i
,
long
j
)
7
{
8
/* We may not fold this to (unsigned long)(i * j). */
9
return
-(
unsigned long
)(
i
* -
j
);
10
}
11
int
main
()
12
{
13
if
(
foo
(-
__LONG_MAX__
-
1
, -
1
) != -(
unsigned long
)(-
__LONG_MAX__
-
1
))
14
abort
();
15
return
0
;
16
}