Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
clean-compiler-and-rts
compiler
Commits
651bde5f
Commit
651bde5f
authored
Mar 05, 2021
by
John van Groningen
Browse files
bug fix, add checks for cases with no alternatives
parent
61393ec7
Changes
2
Hide whitespace changes
Inline
Side-by-side
backendC/CleanCompilerSources/codegen1.c
View file @
651bde5f
...
...
@@ -4377,7 +4377,7 @@ static int generate_code_for_switch_node (NodeP node,int asp,int bsp,struct esc
first_arg
=
node
->
node_arguments
;
match_b_stack_top_element
=
0
;
if
(
first_arg
->
arg_node
->
node_kind
==
CaseNode
&&
first_arg
->
arg_next
!=
NULL
&&
first_arg
->
arg_next
->
arg_node
->
node_kind
==
CaseNode
){
if
(
first_arg
!=
NULL
&&
first_arg
->
arg_node
->
node_kind
==
CaseNode
&&
first_arg
->
arg_next
!=
NULL
&&
first_arg
->
arg_next
->
arg_node
->
node_kind
==
CaseNode
){
if
(
node
->
node_state
.
state_type
==
SimpleState
&&
(
node
->
node_state
.
state_kind
==
OnA
||
node
->
node_state
.
state_kind
==
StrictOnA
)){
int
first_case_symbol_kind
;
Symbol
symbol
;
...
...
backendC/CleanCompilerSources/pattern_match_2.c
View file @
651bde5f
...
...
@@ -555,7 +555,7 @@ static int determine_failing_cases_and_adjust_ref_counts (NodeP node,NodeIdRefCo
/* to do: if non failing case for every constructor, default not reachable */
#if 1
/* added 8-4-1999 */
if
(
node
->
node_arguments
->
arg_next
==
NULL
&&
node
->
node_arguments
->
arg_node
->
node_kind
==
CaseNode
if
(
node
->
node_arguments
!=
NULL
&&
node
->
node_arguments
->
arg_next
==
NULL
&&
node
->
node_arguments
->
arg_node
->
node_kind
==
CaseNode
&&
(
node
->
node_arguments
->
arg_node
->
node_symbol
->
symb_kind
==
tuple_symb
||
(
node
->
node_arguments
->
arg_node
->
node_symbol
->
symb_kind
==
definition
&&
node
->
node_arguments
->
arg_node
->
node_symbol
->
symb_def
->
sdef_kind
==
RECORDTYPE
)))
...
...
John van Groningen
@johnvg
mentioned in issue
#90 (closed)
·
Mar 05, 2021
mentioned in issue
#90 (closed)
mentioned in issue #90
Toggle commit list
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