https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98624
--- Comment #1 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by Nathan Sidwell <nat...@gcc.gnu.org>: https://gcc.gnu.org/g:6e6f3ed47e5cb575819f8253e42313664b89b042 commit r11-6797-g6e6f3ed47e5cb575819f8253e42313664b89b042 Author: Nathan Sidwell <nat...@acm.org> Date: Tue Jan 19 11:31:57 2021 -0800 c++: Fix null this pointer [PR 98624] There's no need for this function to have an object, so make it static and avoid UB. PR c++/98624 gcc/cp/ * module.cc (trees_out::write_location): Make static.