https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103987
--- Comment #6 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Richard Biener <rgue...@gcc.gnu.org>: https://gcc.gnu.org/g:3ed40db0f12994e64434dc2e0590ba1da7ba5f60 commit r12-6672-g3ed40db0f12994e64434dc2e0590ba1da7ba5f60 Author: Richard Biener <rguent...@suse.de> Date: Tue Jan 18 13:26:22 2022 +0100 tree-optimization/103987 - guard DSE modref query This adds a missing guard for a pointer to the DSE modref query, otherwise we can end up invoking APIs desired to only work on pointers on non-pointers when there are mismatches between declared and actual arguments of functions in the program. 2022-01-18 Richard Biener <rguent...@suse.de> PR tree-optimization/103987 * tree-ssa-dse.cc (dse_optimize_call): Properly guard modref query with a pointer check. * gcc.dg/torture/pr103987.c: New testcase.