Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Zwinkau
libfirm
Commits
e116d65e
Commit
e116d65e
authored
Nov 04, 2013
by
Matthias Braun
Browse files
correctly abort confirm insertion in complicated cases
This fixes a crash bug in C/cp_error077.c
parent
e7c8b9b6
Changes
1
Show whitespace changes
Inline
Side-by-side
ir/ana/irconsconfirm.c
View file @
e116d65e
...
@@ -102,14 +102,15 @@ static void handle_case(ir_node *block, ir_node *switchn, long pn, env_t *env)
...
@@ -102,14 +102,15 @@ static void handle_case(ir_node *block, ir_node *switchn, long pn, env_t *env)
ir_node
*
blk
=
get_effective_use_block
(
succ
,
pos
);
ir_node
*
blk
=
get_effective_use_block
(
succ
,
pos
);
if
(
block_dominates
(
block
,
blk
))
{
if
(
block_dominates
(
block
,
blk
))
{
/*
/* Ok, we found a user of irn that is placed
* Ok, we found a user of irn that is placed
* in a block dominated by the branch block.
* in a block dominated by the branch block.
* We can replace the input with the Constant
* We can replace the input with the Constant
* branch label.
* branch label. */
*/
if
(
c
==
NULL
)
{
if
(
c
==
NULL
)
c
=
get_case_value
(
switchn
,
pn
);
c
=
get_case_value
(
switchn
,
pn
);
if
(
c
==
NULL
)
return
;
}
set_irn_n
(
succ
,
pos
,
c
);
set_irn_n
(
succ
,
pos
,
c
);
DBG_OPT_CONFIRM_C
(
selector
,
c
);
DBG_OPT_CONFIRM_C
(
selector
,
c
);
...
...
Write
Preview
Supports
Markdown
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