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
8311a11f
Commit
8311a11f
authored
Jun 05, 1996
by
Per Bothner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* varasm.c (output_constructor): Handle RANGE_EXPR in array index.
From-SVN: r12165
parent
7d49f59f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
1 deletions
+20
-1
gcc/varasm.c
+20
-1
No files found.
gcc/varasm.c
View file @
8311a11f
...
...
@@ -3895,7 +3895,26 @@ output_constructor (exp, size)
if
(
val
!=
0
)
STRIP_NOPS
(
val
);
if
(
field
==
0
||
!
DECL_BIT_FIELD
(
field
))
if
(
index
&&
TREE_CODE
(
index
)
==
RANGE_EXPR
)
{
register
int
fieldsize
=
int_size_in_bytes
(
TREE_TYPE
(
TREE_TYPE
(
exp
)));
HOST_WIDE_INT
lo_index
=
TREE_INT_CST_LOW
(
TREE_OPERAND
(
index
,
0
));
HOST_WIDE_INT
hi_index
=
TREE_INT_CST_LOW
(
TREE_OPERAND
(
index
,
1
));
HOST_WIDE_INT
index
;
for
(
index
=
lo_index
;
index
<=
hi_index
;
index
++
)
{
/* Output the element's initial value. */
if
(
val
==
0
)
assemble_zeros
(
fieldsize
);
else
output_constant
(
val
,
fieldsize
);
/* Count its size. */
total_bytes
+=
fieldsize
;
}
}
else
if
(
field
==
0
||
!
DECL_BIT_FIELD
(
field
))
{
/* An element that is not a bit-field. */
...
...
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