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
13b457e7
Commit
13b457e7
authored
Oct 20, 1993
by
Richard Kenner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(output_constructor): Add support for non-zero lower array bound.
From-SVN: r5836
parent
7c314719
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletions
+6
-1
gcc/varasm.c
+6
-1
No files found.
gcc/varasm.c
View file @
13b457e7
...
@@ -3401,6 +3401,7 @@ output_constructor (exp, size)
...
@@ -3401,6 +3401,7 @@ output_constructor (exp, size)
int
size
;
int
size
;
{
{
register
tree
link
,
field
=
0
;
register
tree
link
,
field
=
0
;
HOST_WIDE_INT
min_index
=
0
;
/* Number of bytes output or skipped so far.
/* Number of bytes output or skipped so far.
In other words, current position within the constructor. */
In other words, current position within the constructor. */
int
total_bytes
=
0
;
int
total_bytes
=
0
;
...
@@ -3414,6 +3415,10 @@ output_constructor (exp, size)
...
@@ -3414,6 +3415,10 @@ output_constructor (exp, size)
if
(
TREE_CODE
(
TREE_TYPE
(
exp
))
==
RECORD_TYPE
)
if
(
TREE_CODE
(
TREE_TYPE
(
exp
))
==
RECORD_TYPE
)
field
=
TYPE_FIELDS
(
TREE_TYPE
(
exp
));
field
=
TYPE_FIELDS
(
TREE_TYPE
(
exp
));
if
(
TREE_CODE
(
TREE_TYPE
(
exp
))
==
ARRAY_TYPE
)
min_index
=
TREE_INT_CST_LOW
(
TYPE_MIN_VALUE
(
TYPE_DOMAIN
(
TREE_TYPE
(
exp
))));
/* As LINK goes through the elements of the constant,
/* As LINK goes through the elements of the constant,
FIELD goes through the structure fields, if the constant is a structure.
FIELD goes through the structure fields, if the constant is a structure.
if the constant is a union, then we override this,
if the constant is a union, then we override this,
...
@@ -3457,7 +3462,7 @@ output_constructor (exp, size)
...
@@ -3457,7 +3462,7 @@ output_constructor (exp, size)
if
(
index
!=
0
)
if
(
index
!=
0
)
bitpos
=
(
TREE_INT_CST_LOW
(
TYPE_SIZE
(
TREE_TYPE
(
val
)))
bitpos
=
(
TREE_INT_CST_LOW
(
TYPE_SIZE
(
TREE_TYPE
(
val
)))
/
BITS_PER_UNIT
/
BITS_PER_UNIT
*
TREE_INT_CST_LOW
(
index
));
*
(
TREE_INT_CST_LOW
(
index
)
-
min_
index
));
/* Output any buffered-up bit-fields preceding this element. */
/* Output any buffered-up bit-fields preceding this element. */
if
(
byte_buffer_in_use
)
if
(
byte_buffer_in_use
)
...
...
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