... because of different representations are passed to fold_builtin_constant_p.
patch in testing
This is also a regression from 3.4.0.
Here is a compile time testcase: int f[__builtin_constant_p(&"Hello"[0])?1:-1];
Subject: Bug 21595 CVSROOT: /cvs/gcc Module name: gcc Changes by: rguenth@gcc.gnu.org 2005-05-17 09:00:03 Modified files: gcc : ChangeLog builtins.c gcc/testsuite : ChangeLog Added files: gcc/testsuite/g++.dg/tree-ssa: builtin1.C Log message: 2005-05-17 Richard Guenther <rguenth@gcc.gnu.org> PR middle-end/21595 * builtins.c (fold_builtin_constant_p): Handle &"string cst"[0] as constant. * g++.dg/tree-ssa/builtin1.C: New testcase. Patches: http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/ChangeLog.diff?cvsroot=gcc&r1=2.8814&r2=2.8815 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/builtins.c.diff?cvsroot=gcc&r1=1.461&r2=1.462 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.5482&r2=1.5483 http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/tree-ssa/builtin1.C.diff?cvsroot=gcc&r1=NONE&r2=1.1
Fixed for 4.0.1.