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
Daily bump.
[official-gcc.git]
/
gcc
/
testsuite
/
gcc.dg
/
fixuns-trunc-1.c
blob
0d0942952497ab6ba2afbc65085ce70c1d71dc3e
1
/* { dg-do run } */
2
/* { dg-options "-std=c99" } */
3
4
unsigned long
foo
(
double
d
)
5
{
6
return
(
unsigned long
)
d
;
7
}
8
9
extern
void
abort
(
void
);
10
11
int
main
(
void
)
12
{
13
double
d
;
14
unsigned long
l
;
15
16
#ifdef __LP64__
17
d
=
9223372036854775808.7
;
18
l
=
1LL
<<
63
;
19
20
if
(
foo
(
d
) !=
l
)
21
abort
();
22
#endif
23
24
d
=
122485.2
;
25
l
=
122485
;
26
27
if
(
foo
(
d
) !=
l
)
28
abort
();
29
30
return
0
;
31
}