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 middle-end/27945
[official-gcc.git]
/
gcc
/
testsuite
/
gcc.dg
/
ftrapv-1.c
blob
44eb176b50d39cecfa4c82f87f669bb7cdb6faf0
1
/* Copyright (C) 2004 Free Software Foundation.
2
3
PR other/15526
4
Verify correct overflow checking with -ftrapv.
5
6
Written by Falk Hueffner, 20th May 2004. */
7
8
/* { dg-do run } */
9
/* { dg-options "-ftrapv" } */
10
11
__attribute__
((
noinline
))
int
12
mulv
(
int
a
,
int
b
)
13
{
14
return
a
*
b
;
15
}
16
17
int
18
main
()
19
{
20
mulv
(
0
,
0
);
21
mulv
(
0
, -
1
);
22
mulv
(-
1
,
0
);
23
mulv
(-
1
, -
1
);
24
return
0
;
25
}