aboutsummaryrefslogtreecommitdiff
path: root/gcc/c
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2022-12-05 10:13:13 +0100
committerRichard Biener <rguenther@suse.de>2022-12-05 14:55:44 +0100
commitd492d50f644811327c5976e2c918ab6d906ed40c (patch)
tree75d52df242e70b54750ff859c264132b63ca975e /gcc/c
parent109148dd16e4bcd50faee19c49082de69d0ba26e (diff)
downloadgcc-d492d50f644811327c5976e2c918ab6d906ed40c.zip
gcc-d492d50f644811327c5976e2c918ab6d906ed40c.tar.gz
gcc-d492d50f644811327c5976e2c918ab6d906ed40c.tar.bz2
tree-optimization/106868 - bogus -Wdangling-pointer diagnostic
The testcase shows we mishandle the case where there's a pass-through of a pointer through a function like memcpy. The following adjusts handling of this copy case to require a taken address and adjust the PHI case similarly. PR tree-optimization/106868 * gimple-ssa-warn-access.cc (pass_waccess::gimple_call_return_arg_ref): Inline into single user ... (pass_waccess::check_dangling_uses): ... here and adjust the call and the PHI case to require that ref.aref is the address of the decl. * gcc.dg/Wdangling-pointer-pr106868.c: New testcase.
Diffstat (limited to 'gcc/c')
0 files changed, 0 insertions, 0 deletions