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
4b3d5ea0
Commit
4b3d5ea0
authored
Jul 04, 1992
by
Richard Stallman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
*** empty log message ***
From-SVN: r1423
parent
2416cbcd
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
2 deletions
+11
-2
gcc/fold-const.c
+11
-2
No files found.
gcc/fold-const.c
View file @
4b3d5ea0
...
...
@@ -1405,8 +1405,17 @@ fold_convert (t, arg1)
l
=
real_value_from_int_cst
(
TYPE_MIN_VALUE
(
type
)),
x
=
TREE_REAL_CST
(
arg1
),
u
=
real_value_from_int_cst
(
TYPE_MAX_VALUE
(
type
));
if
(
!
((
REAL_VALUES_LESS
(
l
,
x
)
||
REAL_VALUES_EQUAL
(
l
,
x
))
&&
(
REAL_VALUES_LESS
(
x
,
u
)
||
REAL_VALUES_EQUAL
(
x
,
u
))))
/* See if X will be in range after truncation towards 0.
To compensate for truncation, move the bounds away from 0,
but reject if X exactly equals the adjusted bounds. */
#ifdef REAL_ARITHMETIC
REAL_ARITHMETIC
(
l
,
MINUS_EXPR
,
l
,
dconst1
);
REAL_ARITHMETIC
(
u
,
PLUS_EXPR
,
u
,
dconst1
);
#else
l
--
;
u
++
;
#endif
if
(
!
(
REAL_VALUES_LESS
(
l
,
x
)
&&
REAL_VALUES_LESS
(
x
,
u
)))
{
warning
(
"real constant out of range for integer conversion"
);
return
t
;
...
...
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