Sign in
fuchsia
/
third_party
/
llvm-test-suite
/
refs/tags/llvmorg-12.0.1
/
.
/
SingleSource
/
Regression
/
C
/
2003-05-21-UnionTest.c
blob: 626ba09d76d336d7b719244c5ef4c2ff86ee4bf6 [
file
] [
log
] [
blame
]
#include
<stdio.h>
int
__signbit
(
double
__x
)
{
union
{
double
__d
;
int
__i
[
3
];
}
__u
=
{
__d
:
__x
};
return
__u
.
__i
[
1
]
<
0
;
}
int
main
()
{
printf
(
"%d %d\n"
,
__signbit
(-
1
),
__signbit
(
2.0
));
return
0
;
}