blob: 20f76c31c41ae69753513b68e3fc8d28abbbd3de (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
/* { dg-do run } */
/* { dg-options "-O2 -mtune=athlon64" } */
extern void abort (void);
long double
__attribute__((noinline, noclone))
test (float num)
{
unsigned int i;
if (num < 0.0)
num = 0.0;
__builtin_memcpy (&i, &num, sizeof(unsigned int));
return (long double)(unsigned long long) i;
}
int
main ()
{
long double x;
x = test (0.0);
if (x != 0.0)
abort ();
return 0;
}
|