aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2022-01-06 15:32:57 +0100
committerJakub Jelinek <jakub@redhat.com>2022-01-06 15:32:57 +0100
commitdb33b1059bcee3eeb36d174d59abf19f2bef5d66 (patch)
tree0258e9f141619e55890306227d359f6b1ca1869c /gcc/ada
parent75b8a726171bcb2e06d70e6179e9926a7ffd73cc (diff)
downloadgcc-db33b1059bcee3eeb36d174d59abf19f2bef5d66.zip
gcc-db33b1059bcee3eeb36d174d59abf19f2bef5d66.tar.gz
gcc-db33b1059bcee3eeb36d174d59abf19f2bef5d66.tar.bz2
expr: Workaround profiledbootstrap uninit false positive [PR103899]
The threader changes resulted in a false positive warning during profiledbootstrap: In file included from ../../gcc/expr.c:26: ../../gcc/tree.h: In function ‘rtx_def* expand_expr_real_1(tree, rtx, machine_mode, expand_modifier, rtx_def**, bool)’: ../../gcc/tree.h:244:56: error: ‘context’ may be used uninitialized in this function [-Werror=maybe-uninitialized] 244 | #define TREE_CODE(NODE) ((enum tree_code) (NODE)->base.code) | ^~~~ ../../gcc/expr.c:10343:8: note: ‘context’ was declared here 10343 | tree context; | ^~~~~~~ While it will be nice to improve the uninit pass to handle it if possible (I do not want to close the PR until that is done), doing profiledbootstrap is a common thing to do, so a workaround is handy, especially as in this case when the workaround seems to be the right thing to do, as it moves a variable declaration to the only place where it is set and used and avoids the weird and for uninit asking tree context; ... if (exp) context = ...; gcc_assert (!exp || use (context) || use_some_more (context)); 2022-01-06 Jakub Jelinek <jakub@redhat.com> PR tree-optimization/103899 * expr.c (expand_expr_real_1): Add a workaround for bogus uninit warning by moving context variable to the only spot where it is used and moving gcc_assert into if body.
Diffstat (limited to 'gcc/ada')
0 files changed, 0 insertions, 0 deletions