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
2baccce2
Commit
2baccce2
authored
Sep 21, 1992
by
Richard Stallman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(put_var_into_stack): Check REG != 0 before dereference.
From-SVN: r2198
parent
13c9910f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
7 deletions
+8
-7
gcc/function.c
+8
-7
No files found.
gcc/function.c
View file @
2baccce2
...
...
@@ -818,11 +818,18 @@ put_var_into_stack (decl)
/* Get the current rtl used for this object and it's original mode. */
reg
=
TREE_CODE
(
decl
)
==
SAVE_EXPR
?
SAVE_EXPR_RTL
(
decl
)
:
DECL_RTL
(
decl
);
promoted_mode
=
GET_MODE
(
reg
);
/* No need to do anything if decl has no rtx yet
since in that case caller is setting TREE_ADDRESSABLE
and a stack slot will be assigned when the rtl is made. */
if
(
reg
==
0
)
return
;
/* Get the declared mode for this object. */
decl_mode
=
(
TREE_CODE
(
decl
)
==
SAVE_EXPR
?
TYPE_MODE
(
TREE_TYPE
(
decl
))
:
DECL_MODE
(
decl
));
/* Get the mode it's actually stored in. */
promoted_mode
=
GET_MODE
(
reg
);
/* If this variable comes from an outer function,
find that function's saved context. */
...
...
@@ -831,12 +838,6 @@ put_var_into_stack (decl)
if
(
function
->
decl
==
context
)
break
;
/* No need to do anything if decl has no rtx yet
since in that case caller is setting TREE_ADDRESSABLE
and a stack slot will be assigned when the rtl is made. */
if
(
reg
==
0
)
return
;
/* If this is a variable-size object with a pseudo to address it,
put that pseudo into the stack, if the var is nonlocal. */
if
(
DECL_NONLOCAL
(
decl
)
...
...
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