Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
riscv-gcc-1
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
riscv-gcc-1
Commits
c03f7543
Commit
c03f7543
authored
Feb 17, 1998
by
Jeff Law
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
New alpha test from HJ.
From-SVN: r18046
parent
a5d3469c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
36 additions
and
0 deletions
+36
-0
gcc/testsuite/gcc.dg/980217-1.c
+36
-0
No files found.
gcc/testsuite/gcc.dg/980217-1.c
0 → 100644
View file @
c03f7543
/* Test float on alpha. */
/* { dg-do run { target alpha*-*-* } } */
/* { dg-options "-mieee -O2" } */
typedef
int
int32_t
__attribute__
((
__mode__
(
__SI__
)))
;
typedef
union
{
float
value
;
int32_t
word
;
}
ieee_float_shape_type
;
int
isinff
(
float
x
)
{
int32_t
ix
,
t
;
ieee_float_shape_type
gf_u
;
gf_u
.
value
=
x
;
ix
=
gf_u
.
word
;
printf
(
"%x
\n
"
,
ix
);
t
=
ix
&
0x7fffffff
;
t
^=
0x7f800000
;
t
|=
-
t
;
return
~
(
t
>>
31
)
&
(
1
-
((
ix
&
0x80000000
)
>>
30
));
}
main
()
{
float
x
=
1
.
0
/
0
.
0
;
int
i
=
isinff
(
x
);
if
(
i
==
0
)
abort
();
printf
(
"%d
\n
"
,
i
);
return
0
;
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment