OSDN Git Service
(root)
/
pf3gnuchains
/
gcc-fork.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Merge from transactional-memory branch.
[pf3gnuchains/gcc-fork.git]
/
gcc
/
testsuite
/
gcc.dg
/
ftrapv-3.c
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
}