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
6bc2f582
Commit
6bc2f582
authored
Mar 18, 1995
by
Richard Kenner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(fixup_gotos): Do a cleanup for a block when it is exited even if
label if not defined yet. From-SVN: r9204
parent
81f59869
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
9 deletions
+21
-9
gcc/stmt.c
+21
-9
No files found.
gcc/stmt.c
View file @
6bc2f582
...
@@ -1214,30 +1214,42 @@ fixup_gotos (thisblock, stack_level, cleanup_list, first_insn, dont_jump_in)
...
@@ -1214,30 +1214,42 @@ fixup_gotos (thisblock, stack_level, cleanup_list, first_insn, dont_jump_in)
}
}
}
}
/* Mark the cleanups of exited blocks so that they are executed
/* For any still-undefined labels, do the cleanups for this block now.
by the code above. */
We must do this now since items in the cleanup list may go out
of scope when the block ends. */
for
(
prev
=
0
,
f
=
goto_fixup_chain
;
f
;
prev
=
f
,
f
=
f
->
next
)
for
(
prev
=
0
,
f
=
goto_fixup_chain
;
f
;
prev
=
f
,
f
=
f
->
next
)
if
(
f
->
before_jump
!=
0
if
(
f
->
before_jump
!=
0
&&
PREV_INSN
(
f
->
target_rtl
)
==
0
&&
PREV_INSN
(
f
->
target_rtl
)
==
0
/* Label has still not appeared. If we are exiting a block with
/* Label has still not appeared. If we are exiting a block with
a stack level to restore, that started before the fixup,
a stack level to restore, that started before the fixup,
mark this stack level as needing restoration
mark this stack level as needing restoration
when the fixup is later finalized.
when the fixup is later finalized. */
Also mark the cleanup_list_list element for F
that corresponds to this block, so that ultimately
this block's cleanups will be executed by the code above. */
&&
thisblock
!=
0
&&
thisblock
!=
0
/* Note: if THISBLOCK == 0 and we have a label that hasn't appeared,
/* Note: if THISBLOCK == 0 and we have a label that hasn't appeared,
it
it
means the label is undefined. That's erroneous, but possible. */
means the label is undefined. That's erroneous, but possible. */
&&
(
thisblock
->
data
.
block
.
block_start_count
&&
(
thisblock
->
data
.
block
.
block_start_count
<=
f
->
block_start_count
))
<=
f
->
block_start_count
))
{
{
tree
lists
=
f
->
cleanup_list_list
;
tree
lists
=
f
->
cleanup_list_list
;
rtx
cleanup_insns
;
for
(;
lists
;
lists
=
TREE_CHAIN
(
lists
))
for
(;
lists
;
lists
=
TREE_CHAIN
(
lists
))
/* If the following elt. corresponds to our containing block
/* If the following elt. corresponds to our containing block
then the elt. must be for this block. */
then the elt. must be for this block. */
if
(
TREE_CHAIN
(
lists
)
==
thisblock
->
data
.
block
.
outer_cleanups
)
if
(
TREE_CHAIN
(
lists
)
==
thisblock
->
data
.
block
.
outer_cleanups
)
TREE_ADDRESSABLE
(
lists
)
=
1
;
{
start_sequence
();
pushlevel
(
0
);
set_block
(
f
->
context
);
expand_cleanups
(
TREE_VALUE
(
lists
),
NULL_TREE
,
1
,
1
);
cleanup_insns
=
get_insns
();
poplevel
(
1
,
0
,
0
);
end_sequence
();
f
->
before_jump
=
emit_insns_after
(
cleanup_insns
,
f
->
before_jump
);
TREE_VALUE
(
lists
)
=
0
;
}
if
(
stack_level
)
if
(
stack_level
)
f
->
stack_level
=
stack_level
;
f
->
stack_level
=
stack_level
;
...
...
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