-
- Downloads
middle-end/94188 fix fold of addr expression generation
This adds a missing type conversion to build_fold_addr_expr and adjusts fallout - build_fold_addr_expr was used as a convenience to build an ADDR_EXPR but some callers do not expect the result to be simplified to something else. 2020-03-18 Richard Biener <rguenther@suse.de> PR middle-end/94188 * fold-const.c (build_fold_addr_expr): Convert address to correct type. * asan.c (maybe_create_ssa_name): Strip useless type conversions. * gimple-fold.c (gimple_fold_stmt_to_constant_1): Use build1 to build the ADDR_EXPR which we don't really want to simplify. * tree-ssa-dom.c (record_equivalences_from_stmt): Likewise. * tree-ssa-loop-im.c (gather_mem_refs_stmt): Likewise. * tree-ssa-forwprop.c (forward_propagate_addr_expr_1): Likewise. (simplify_builtin_call): Strip useless type conversions. * tree-ssa-strlen.c (new_strinfo): Likewise. * gcc.dg/pr94188.c: New testcase.
Showing
- gcc/ChangeLog 14 additions, 0 deletionsgcc/ChangeLog
- gcc/asan.c 3 additions, 2 deletionsgcc/asan.c
- gcc/fold-const.c 6 additions, 1 deletiongcc/fold-const.c
- gcc/gimple-fold.c 2 additions, 2 deletionsgcc/gimple-fold.c
- gcc/testsuite/ChangeLog 5 additions, 0 deletionsgcc/testsuite/ChangeLog
- gcc/testsuite/gcc.dg/pr94188.c 10 additions, 0 deletionsgcc/testsuite/gcc.dg/pr94188.c
- gcc/tree-ssa-dom.c 4 additions, 5 deletionsgcc/tree-ssa-dom.c
- gcc/tree-ssa-forwprop.c 6 additions, 5 deletionsgcc/tree-ssa-forwprop.c
- gcc/tree-ssa-loop-im.c 2 additions, 1 deletiongcc/tree-ssa-loop-im.c
- gcc/tree-ssa-strlen.c 2 additions, 1 deletiongcc/tree-ssa-strlen.c
Loading
Please register or sign in to comment