aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-strlen.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2020-03-16 22:58:41 +0100
committerJakub Jelinek <jakub@redhat.com>2020-03-16 22:58:41 +0100
commitc015ff8ccaf3ee8e4f6393679ed790ed0df92873 (patch)
treed8b570cffa193c1ce5b539e57157e231ead1df47 /gcc/tree-ssa-strlen.c
parentbae7b38cf8a21e068ad5c0bab089dedb78af3346 (diff)
downloadgcc-c015ff8ccaf3ee8e4f6393679ed790ed0df92873.zip
gcc-c015ff8ccaf3ee8e4f6393679ed790ed0df92873.tar.gz
gcc-c015ff8ccaf3ee8e4f6393679ed790ed0df92873.tar.bz2
c: Handle MEM_REF in c_fully_fold* [PR94179]
The recent match.pd changes can generate a MEM_REF which can be seen by the C FE folding routines. Unlike the C++ FE, they weren't expected in the C FE yet. MEM_REF should be handled like INDIRECT_REF, except that it has two operands rather than just one and that we should preserve the type of the second operand. Given that it already has to be an INTEGER_CST with pointer type, I think we are fine, the recursive call should return the INTEGER_CST unmodified and STRIP_TYPE_NOPS will not strip anything. 2020-03-16 Jakub Jelinek <jakub@redhat.com> PR c/94179 * c-fold.c (c_fully_fold_internal): Handle MEM_REF. * gcc.c-torture/compile/pr94179.c: New test.
Diffstat (limited to 'gcc/tree-ssa-strlen.c')
0 files changed, 0 insertions, 0 deletions