https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97803
--- Comment #6 from CVS Commits <cvs-commit at gcc dot gnu.org> --- The master branch has been updated by H.J. Lu <h...@gcc.gnu.org>: https://gcc.gnu.org/g:9dbf8dc7a96a8020e0ee05926ef7a3f976e9c318 commit r11-5054-g9dbf8dc7a96a8020e0ee05926ef7a3f976e9c318 Author: H.J. Lu <hjl.to...@gmail.com> Date: Wed Nov 11 15:54:00 2020 -0800 pointer-compare-1.c: Add __attribute__((used)) c-c++-common/asan/pointer-compare-1.c assumes the certain order for variable placement. Add __attribute__((used)) to avoid variable placement changes due to SHF_GNU_RETAIN. PR testsuite/97803 * c-c++-common/asan/pointer-compare-1.c (global1): Add __attribute__((used)) (global2): Likewise. (small_global): Likewise. (large_global): Likewise.