https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77624
--- Comment #7 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Author: jakub Date: Wed Dec 7 22:29:54 2016 New Revision: 243384 URL: https://gcc.gnu.org/viewcvs?rev=243384&root=gcc&view=rev Log: Backported from mainline 2016-09-20 Jakub Jelinek <ja...@redhat.com> PR middle-end/77624 * builtins.c (fold_builtin_atomic_always_lock_free): Only look through cast to void * if the cast is from some other pointer type. * c-c++-common/pr77624-1.c: New test. * c-c++-common/pr77624-2.c: New test. Added: branches/gcc-6-branch/gcc/testsuite/c-c++-common/pr77624-1.c branches/gcc-6-branch/gcc/testsuite/c-c++-common/pr77624-2.c Modified: branches/gcc-6-branch/gcc/ChangeLog branches/gcc-6-branch/gcc/builtins.c branches/gcc-6-branch/gcc/testsuite/ChangeLog