From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1011 invoked by alias); 5 Jun 2005 17:35:22 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 991 invoked by alias); 5 Jun 2005 17:35:20 -0000 Date: Sun, 05 Jun 2005 17:35:00 -0000 Message-ID: <20050605173520.988.qmail@sourceware.org> From: "mark at codesourcery dot com" To: gcc-bugs@gcc.gnu.org In-Reply-To: <20050517114202.21619.rguenth@gcc.gnu.org> References: <20050517114202.21619.rguenth@gcc.gnu.org> Reply-To: gcc-bugzilla@gcc.gnu.org Subject: [Bug c++/21619] [4.0 regression] __builtin_constant_p(&"Hello"[0])?1:-1 not compile-time constant X-Bugzilla-Reason: CC X-SW-Source: 2005-06/txt/msg00824.txt.bz2 List-Id: ------- Additional Comments From mark at codesourcery dot com 2005-06-05 17:35 ------- Subject: Re: [4.0 regression] __builtin_constant_p(&"Hello"[0])?1:-1 not compile-time constant pinskia at gcc dot gnu dot org wrote: > ------- Additional Comments From pinskia at gcc dot gnu dot org 2005-06-05 17:30 ------- > Mark this is fixed on the 4.0 branch, the middle-end part was PR 21595 and was commited to 4.0 > branch: > 2005-05-27 Richard Guenther > > PR middle-end/21595 > * builtins.c (fold_builtin_constant_p): Handle > &"string cst"[0] as constant. > > And the testcase here works now. > > Were you using an old branch to test on? Good thought; let me just confirm. If so, I'll add the testcase, and close the PR. Thanks! -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21619