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
be1ad04c
Commit
be1ad04c
authored
Mar 01, 1994
by
Richard Kenner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(output_constant): Strip off some NOP_EXPRs before further processing.
From-SVN: r6683
parent
2d57146b
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
6 deletions
+11
-6
gcc/varasm.c
+11
-6
No files found.
gcc/varasm.c
View file @
be1ad04c
...
...
@@ -3323,6 +3323,17 @@ output_constant (exp, size)
if
(
size
==
0
)
return
;
/* Eliminate the NON_LVALUE_EXPR_EXPR that makes a cast not be an lvalue.
That way we get the constant (we hope) inside it. Also, strip
off any NOP_EXPR that converts between two record or union types. */
while
((
TREE_CODE
(
exp
)
==
NOP_EXPR
&&
(
TREE_TYPE
(
exp
)
==
TREE_TYPE
(
TREE_OPERAND
(
exp
,
0
))
||
TREE_CODE
(
TREE_TYPE
(
exp
))
==
RECORD_TYPE
||
TREE_CODE
(
TREE_TYPE
(
exp
))
==
UNION_TYPE
||
TREE_CODE
(
TREE_TYPE
(
exp
))
==
QUAL_UNION_TYPE
))
||
TREE_CODE
(
exp
)
==
NON_LVALUE_EXPR
)
exp
=
TREE_OPERAND
(
exp
,
0
);
/* Allow a constructor with no elements for any data type.
This means to fill the space with zeros. */
if
(
TREE_CODE
(
exp
)
==
CONSTRUCTOR
&&
CONSTRUCTOR_ELTS
(
exp
)
==
0
)
...
...
@@ -3334,12 +3345,6 @@ output_constant (exp, size)
return
;
}
/* Eliminate the NOP_EXPR that makes a cast not be an lvalue.
That way we get the constant (we hope) inside it. */
if
(
TREE_CODE
(
exp
)
==
NOP_EXPR
&&
TREE_TYPE
(
exp
)
==
TREE_TYPE
(
TREE_OPERAND
(
exp
,
0
)))
exp
=
TREE_OPERAND
(
exp
,
0
);
switch
(
code
)
{
case
CHAR_TYPE
:
...
...
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