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
473ebbc5
Commit
473ebbc5
authored
Sep 21, 2009
by
Eric Botcazou
Committed by
Eric Botcazou
Sep 21, 2009
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* stor-layout.c (layout_type): Remove obsolete code.
From-SVN: r151913
parent
b31b5567
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
27 deletions
+10
-27
gcc/ChangeLog
+4
-0
gcc/stor-layout.c
+6
-27
No files found.
gcc/ChangeLog
View file @
473ebbc5
2009-09-21 Eric Botcazou <ebotcazou@adacore.com>
* stor-layout.c (layout_type): Remove obsolete code.
2009-09-20 H.J. Lu <hongjiu.lu@intel.com>
2009-09-20 H.J. Lu <hongjiu.lu@intel.com>
PR middle-end/41395
PR middle-end/41395
...
...
gcc/stor-layout.c
View file @
473ebbc5
...
@@ -1956,8 +1956,8 @@ layout_type (tree type)
...
@@ -1956,8 +1956,8 @@ layout_type (tree type)
{
{
tree
ub
=
TYPE_MAX_VALUE
(
index
);
tree
ub
=
TYPE_MAX_VALUE
(
index
);
tree
lb
=
TYPE_MIN_VALUE
(
index
);
tree
lb
=
TYPE_MIN_VALUE
(
index
);
tree
element_size
=
TYPE_SIZE
(
element
);
tree
length
;
tree
length
;
tree
element_size
;
/* The initial subtraction should happen in the original type so
/* The initial subtraction should happen in the original type so
that (possible) negative values are handled appropriately. */
that (possible) negative values are handled appropriately. */
...
@@ -1968,23 +1968,6 @@ layout_type (tree type)
...
@@ -1968,23 +1968,6 @@ layout_type (tree type)
TREE_TYPE
(
lb
),
TREE_TYPE
(
lb
),
ub
,
lb
)));
ub
,
lb
)));
/* Special handling for arrays of bits (for Chill). */
element_size
=
TYPE_SIZE
(
element
);
if
(
TYPE_PACKED
(
type
)
&&
INTEGRAL_TYPE_P
(
element
)
&&
(
integer_zerop
(
TYPE_MAX_VALUE
(
element
))
||
integer_onep
(
TYPE_MAX_VALUE
(
element
)))
&&
host_integerp
(
TYPE_MIN_VALUE
(
element
),
1
))
{
HOST_WIDE_INT
maxvalue
=
tree_low_cst
(
TYPE_MAX_VALUE
(
element
),
1
);
HOST_WIDE_INT
minvalue
=
tree_low_cst
(
TYPE_MIN_VALUE
(
element
),
1
);
if
(
maxvalue
-
minvalue
==
1
&&
(
maxvalue
==
1
||
maxvalue
==
0
))
element_size
=
integer_one_node
;
}
/* If neither bound is a constant and sizetype is signed, make
/* If neither bound is a constant and sizetype is signed, make
sure the size is never negative. We should really do this
sure the size is never negative. We should really do this
if *either* bound is non-constant, but this is the best
if *either* bound is non-constant, but this is the best
...
@@ -1998,15 +1981,11 @@ layout_type (tree type)
...
@@ -1998,15 +1981,11 @@ layout_type (tree type)
fold_convert
(
bitsizetype
,
fold_convert
(
bitsizetype
,
length
));
length
));
/* If we know the size of the element, calculate the total
/* If we know the size of the element, calculate the total size
size directly, rather than do some division thing below.
directly, rather than do some division thing below. This
This optimization helps Fortran assumed-size arrays
optimization helps Fortran assumed-size arrays (where the
(where the size of the array is determined at runtime)
size of the array is determined at runtime) substantially. */
substantially.
if
(
TYPE_SIZE_UNIT
(
element
))
Note that we can't do this in the case where the size of
the elements is one bit since TYPE_SIZE_UNIT cannot be
set correctly in that case. */
if
(
TYPE_SIZE_UNIT
(
element
)
!=
0
&&
!
integer_onep
(
element_size
))
TYPE_SIZE_UNIT
(
type
)
TYPE_SIZE_UNIT
(
type
)
=
size_binop
(
MULT_EXPR
,
TYPE_SIZE_UNIT
(
element
),
length
);
=
size_binop
(
MULT_EXPR
,
TYPE_SIZE_UNIT
(
element
),
length
);
}
}
...
...
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