aboutsummaryrefslogtreecommitdiff
path: root/gcc/config/arm
diff options
context:
space:
mode:
authorMartin Jambor <mjambor@suse.cz>2021-11-09 11:32:20 +0100
committerMartin Jambor <mjambor@suse.cz>2021-11-09 11:37:17 +0100
commitdf8690f28379795a44aa4b6c737df08828168b6a (patch)
tree2753929a1be7fd687d5472c67569bf8505933d8e /gcc/config/arm
parent77eb8c649d6dff15e63e2ea71a4a1b513a4be844 (diff)
downloadgcc-df8690f28379795a44aa4b6c737df08828168b6a.zip
gcc-df8690f28379795a44aa4b6c737df08828168b6a.tar.gz
gcc-df8690f28379795a44aa4b6c737df08828168b6a.tar.bz2
ipa: Fix segfault when remapping debug_binds with expressions (PR 103132)
My initial implementation of the method ipa_param_body_adjustments::remap_with_debug_expressions was based on the assumption that if it was asked to remap an expression (as opposed to a simple SSA_NAME), the expression would not contain an SSA_NAME operand which is to be debug-reset. While that is true for when called from ipa_param_body_adjustments::prepare_debug_expressions, it turns out it is not true when invoked from remap_gimple_stmt in tree-inline.c. This patch adds a simple logic to handle such cases and simply map the entire value to NULL_TREE in those cases. gcc/ChangeLog: 2021-11-08 Martin Jambor <mjambor@suse.cz> PR ipa/103132 * ipa-param-manipulation.c (replace_with_mapped_expr): Early return with error_mark_mode when part of expression is mapped to NULL. (ipa_param_body_adjustments::remap_with_debug_expressions): Set mapped value to NULL if walk_tree returns error_mark_mode. gcc/testsuite/ChangeLog: 2021-11-08 Martin Jambor <mjambor@suse.cz> PR ipa/103132 * gcc.dg/ipa/pr103132.c: New test.
Diffstat (limited to 'gcc/config/arm')
0 files changed, 0 insertions, 0 deletions