aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/openmp.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2020-03-12 09:34:00 +0100
committerJakub Jelinek <jakub@redhat.com>2020-03-12 09:34:00 +0100
commit349ab34dc64a10fe0b1eda66d13b62862878b73e (patch)
treec4a06e3f4052b53c3edf78fbc472cad52ddaa82d /gcc/fortran/openmp.c
parent4069adf4bbc90d16b603e0308b48499c36b2b637 (diff)
downloadgcc-349ab34dc64a10fe0b1eda66d13b62862878b73e.zip
gcc-349ab34dc64a10fe0b1eda66d13b62862878b73e.tar.gz
gcc-349ab34dc64a10fe0b1eda66d13b62862878b73e.tar.bz2
tree-dse: Fix mem* head trimming if call has lhs [PR94130]
As the testcase shows, if DSE decides to head trim {mem{set,cpy,move},strncpy} and the call has lhs, it is incorrect to leave the lhs as is, because it will then point to the adjusted address (base + head_trim) instead of the original base. The following patch fixes that by dropping the lhs of the call and assigning lhs the original base in a following statement. 2020-03-12 Jakub Jelinek <jakub@redhat.com> PR tree-optimization/94130 * tree-ssa-dse.c: Include gimplify.h. (increment_start_addr): If stmt has lhs, drop the lhs from call and set it after the call to the original value of the first argument. Formatting fixes. (decrement_count): Formatting fix. * gcc.c-torture/execute/pr94130.c: New test.
Diffstat (limited to 'gcc/fortran/openmp.c')
0 files changed, 0 insertions, 0 deletions