aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran/trans-expr.c
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2021-10-22 10:32:36 +0200
committerRichard Biener <rguenther@suse.de>2021-10-22 11:37:35 +0200
commitfe8475c500939011b90504304aec61bf6f48ac7d (patch)
treea80c3e0baa42ea49570b930bb3ba4e2509ef8bac /gcc/fortran/trans-expr.c
parentae5c540662e08de72c849bad992fea468e3b6017 (diff)
downloadgcc-fe8475c500939011b90504304aec61bf6f48ac7d.zip
gcc-fe8475c500939011b90504304aec61bf6f48ac7d.tar.gz
gcc-fe8475c500939011b90504304aec61bf6f48ac7d.tar.bz2
bootstrap/102681 - properly CSE PHIs with default def args
The PR shows that we fail to CSE PHIs containing (different) default definitions due to the fact on how we now handle on-demand build of VN_INFO. The following fixes this in the same way the PHI visitation code does. On gcc.dg/ubsan/pr81981.c this causes one expected warning to be elided since the uninit pass sees the change <bb 4> [local count: 1073741824]: # u$0_2 = PHI <u$0_5(D)(3), i_3(D)(5)> - # cstore_11 = PHI <t$0_6(D)(3), i_3(D)(5)> v = u$0_2; - return cstore_11; + return u$0_2; and thus only one of the conditionally uninitialized uses (the other became dead). I have XFAILed the missing diagnostic, I don't see a way to preserve that. 2021-10-22 Richard Biener <rguenther@suse.de> PR bootstrap/102681 * tree-ssa-sccvn.c (vn_phi_insert): For undefined SSA args record VN_TOP. (vn_phi_lookup): Likewise. * gcc.dg/tree-ssa/ssa-fre-97.c: New testcase. * gcc.dg/ubsan/pr81981.c: XFAIL one case.
Diffstat (limited to 'gcc/fortran/trans-expr.c')
0 files changed, 0 insertions, 0 deletions