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
d0d565e1
Commit
d0d565e1
authored
Dec 01, 2009
by
Janne Blomqvist
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
PR fortran/42131 Sign test using ternary operator
From-SVN: r154876
parent
d557591d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
10 deletions
+11
-10
gcc/fortran/ChangeLog
+5
-0
gcc/fortran/trans-stmt.c
+6
-10
No files found.
gcc/fortran/ChangeLog
View file @
d0d565e1
2009-12-01 Janne Blomqvist <jb@gcc.gnu.org>
* PR fortran/42131
* trans-stmt.c (gfc_trans_do): Sign test using ternary operator.
2009-11-30 Janus Weil <janus@gcc.gnu.org>
PR fortran/42053
...
...
gcc/fortran/trans-stmt.c
View file @
d0d565e1
...
...
@@ -1028,17 +1028,13 @@ gfc_trans_do (gfc_code * code)
{
tree
pos
,
neg
,
step_sign
,
to2
,
from2
,
step2
;
/* Calculate SIGN (1,step) */
/* Calculate SIGN (1,step)
, as (step < 0 ? -1 : 1)
*/
tmp
=
fold_build2
(
RSHIFT_EXPR
,
type
,
step
,
build_int_cst
(
type
,
TYPE_PRECISION
(
type
)
-
1
));
tmp
=
fold_build2
(
MULT_EXPR
,
type
,
tmp
,
build_int_cst
(
type
,
2
));
step_sign
=
fold_build2
(
PLUS_EXPR
,
type
,
tmp
,
fold_convert
(
type
,
integer_one_node
));
tmp
=
fold_build2
(
LT_EXPR
,
boolean_type_node
,
step
,
build_int_cst
(
TREE_TYPE
(
step
),
0
));
step_sign
=
fold_build3
(
COND_EXPR
,
type
,
tmp
,
build_int_cst
(
type
,
-
1
),
build_int_cst
(
type
,
1
));
tmp
=
fold_build2
(
LT_EXPR
,
boolean_type_node
,
to
,
from
);
pos
=
fold_build3
(
COND_EXPR
,
void_type_node
,
tmp
,
...
...
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