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
f8125f0c
Commit
f8125f0c
authored
Nov 30, 2015
by
Eric Botcazou
Committed by
Eric Botcazou
Nov 30, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* gcc-interface/utils2.c (gnat_invariant_expr): Add type conversions.
From-SVN: r231063
parent
14ecca2e
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
34 additions
and
1 deletions
+34
-1
gcc/ada/ChangeLog
+4
-0
gcc/ada/gcc-interface/utils2.c
+3
-1
gcc/testsuite/ChangeLog
+4
-0
gcc/testsuite/gnat.dg/loop_optimization22.adb
+16
-0
gcc/testsuite/gnat.dg/loop_optimization22.ads
+7
-0
No files found.
gcc/ada/ChangeLog
View file @
f8125f0c
2015
-
11
-
30
Eric
Botcazou
<
ebotcazou
@
adacore
.
com
>
*
gcc
-
interface
/
utils2
.
c
(
gnat_invariant_expr
):
Add
type
conversions
.
2015
-
11
-
30
Eric
Botcazou
<
ebotcazou
@
adacore
.
com
>
*
gcc
-
interface
/
ada
-
tree
.
h
(
TYPE_MAX_ALIGN
):
New
macro
.
*
gcc
-
interface
/
decl
.
c
(
gnat_to_gnu_entity
):
Do
not
set
PACKED
to
-
2.
Remove
obsolete
code
setting
the
alignment
on
some
atomic
types
.
...
...
gcc/ada/gcc-interface/utils2.c
View file @
f8125f0c
...
...
@@ -2860,7 +2860,9 @@ gnat_invariant_expr (tree expr)
tree
op0
=
gnat_invariant_expr
(
TREE_OPERAND
(
expr
,
0
));
tree
op1
=
TREE_OPERAND
(
expr
,
1
);
if
(
op0
&&
TREE_CONSTANT
(
op1
))
return
fold_build2
(
TREE_CODE
(
expr
),
type
,
op0
,
op1
);
return
fold_build2
(
TREE_CODE
(
expr
),
type
,
fold_convert
(
type
,
op0
),
fold_convert
(
type
,
op1
));
else
return
NULL_TREE
;
}
...
...
gcc/testsuite/ChangeLog
View file @
f8125f0c
2015-11-30 Eric Botcazou <ebotcazou@adacore.com>
* gnat.dg/loop_optimization22.ad[sb]: New test.
2015-11-30 Eric Botcazou <ebotcazou@adacore.com>
* gnat.dg/specs/rep_clause5.ads: New test.
2015-11-29 Jan Hubicka <hubicka@ucw.cz>
...
...
gcc/testsuite/gnat.dg/loop_optimization22.adb
0 → 100644
View file @
f8125f0c
--
{
dg
-
do
compile
}
--
{
dg
-
options
"-O"
}
pragma
Overflow_Mode
(
Minimized
);
package
body
Loop_Optimization22
is
procedure
Foo
(
X
:
Discrim_Type
)
is
H
:
array
(
1
..
Integer
(
X
.
Count
)
+
1
)
of
Float
;
begin
for
I
in
1
..
X
.
Count
loop
H
(
Integer
(
I
)
+
1
):=
0.0
;
end
loop
;
end
;
end
Loop_Optimization22
;
gcc/testsuite/gnat.dg/loop_optimization22.ads
0 → 100644
View file @
f8125f0c
package
Loop_Optimization22
is
type
Discrim_Type
(
Count
:
Positive
)
is
null
record
;
procedure
Foo
(
X
:
Discrim_Type
);
end
Loop_Optimization22
;
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