public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/21619] New: [4.0/4.1 regression] __builtin_constant_p(&"Hello"[0])?1:-1 not compile-time constant
@ 2005-05-17 11:42 rguenth at gcc dot gnu dot org
2005-05-17 11:43 ` [Bug c++/21619] " pinskia at gcc dot gnu dot org
` (14 more replies)
0 siblings, 15 replies; 16+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2005-05-17 11:42 UTC (permalink / raw)
To: gcc-bugs
The testcase
int f[__builtin_constant_p(&"Hello"[0])?1:-1];
did work on gcc 3.4, but doesn't any longer on 4.0 and 4.1.
The parser gets an integer constant node from fold_builtin, but still
thinks it is not a compile time constant for the array bound.
--
Summary: [4.0/4.1 regression]
__builtin_constant_p(&"Hello"[0])?1:-1 not compile-time
constant
Product: gcc
Version: 4.1.0
Status: UNCONFIRMED
Keywords: rejects-valid, missed-optimization
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: rguenth at gcc dot gnu dot org
CC: gcc-bugs at gcc dot gnu dot org
BugsThisDependsOn: 21595
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21619
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug c++/21619] [4.0/4.1 regression] __builtin_constant_p(&"Hello"[0])?1:-1 not compile-time constant
2005-05-17 11:42 [Bug c++/21619] New: [4.0/4.1 regression] __builtin_constant_p(&"Hello"[0])?1:-1 not compile-time constant rguenth at gcc dot gnu dot org
@ 2005-05-17 11:43 ` pinskia at gcc dot gnu dot org
2005-05-27 18:08 ` rguenth at gcc dot gnu dot org
` (13 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-05-17 11:43 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-05-17 11:43 -------
Confirmed.
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |pinskia at gcc dot gnu dot
| |org
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
Last reconfirmed|0000-00-00 00:00:00 |2005-05-17 11:43:17
date| |
Target Milestone|--- |4.0.1
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21619
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug c++/21619] [4.0/4.1 regression] __builtin_constant_p(&"Hello"[0])?1:-1 not compile-time constant
2005-05-17 11:42 [Bug c++/21619] New: [4.0/4.1 regression] __builtin_constant_p(&"Hello"[0])?1:-1 not compile-time constant rguenth at gcc dot gnu dot org
2005-05-17 11:43 ` [Bug c++/21619] " pinskia at gcc dot gnu dot org
@ 2005-05-27 18:08 ` rguenth at gcc dot gnu dot org
2005-06-01 0:32 ` pinskia at gcc dot gnu dot org
` (12 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2005-05-27 18:08 UTC (permalink / raw)
To: gcc-bugs
--
Bug 21619 depends on bug 21595, which changed state.
Bug 21595 Summary: [4.0 Regression] __builtin_constant_p(&"Hello"[0]) is true for C but not for C++
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21595
What |Old Value |New Value
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21619
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug c++/21619] [4.0/4.1 regression] __builtin_constant_p(&"Hello"[0])?1:-1 not compile-time constant
2005-05-17 11:42 [Bug c++/21619] New: [4.0/4.1 regression] __builtin_constant_p(&"Hello"[0])?1:-1 not compile-time constant rguenth at gcc dot gnu dot org
2005-05-17 11:43 ` [Bug c++/21619] " pinskia at gcc dot gnu dot org
2005-05-27 18:08 ` rguenth at gcc dot gnu dot org
@ 2005-06-01 0:32 ` pinskia at gcc dot gnu dot org
2005-06-01 8:16 ` rguenth at tat dot physik dot uni-tuebingen dot de
` (11 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-06-01 0:32 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-06-01 00:31 -------
: Search converges between 2004-08-30-trunk (#529) and 2004-08-31-trunk (#530).
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21619
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug c++/21619] [4.0/4.1 regression] __builtin_constant_p(&"Hello"[0])?1:-1 not compile-time constant
2005-05-17 11:42 [Bug c++/21619] New: [4.0/4.1 regression] __builtin_constant_p(&"Hello"[0])?1:-1 not compile-time constant rguenth at gcc dot gnu dot org
` (2 preceding siblings ...)
2005-06-01 0:32 ` pinskia at gcc dot gnu dot org
@ 2005-06-01 8:16 ` rguenth at tat dot physik dot uni-tuebingen dot de
2005-06-03 23:37 ` mmitchel at gcc dot gnu dot org
` (10 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: rguenth at tat dot physik dot uni-tuebingen dot de @ 2005-06-01 8:16 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From rguenth at tat dot physik dot uni-tuebingen dot de 2005-06-01 08:16 -------
Subject: Re: [4.0/4.1 regression] __builtin_constant_p(&"Hello"[0])?1:-1
not compile-time constant
On 1 Jun 2005, pinskia at gcc dot gnu dot org wrote:
>
> ------- Additional Comments From pinskia at gcc dot gnu dot org 2005-06-01 00:31 -------
> : Search converges between 2004-08-30-trunk (#529) and 2004-08-31-trunk (#530).
Top of cp/ChangeLog for these? I point my finger at
2004-08-31 Richard Henderson <rth@redhat.com>
PR c++/17221
* pt.c (tsubst_expr): Move OFFSETOF_EXPR handling ...
(tsubst_copy_and_build): ... here.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21619
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug c++/21619] [4.0/4.1 regression] __builtin_constant_p(&"Hello"[0])?1:-1 not compile-time constant
2005-05-17 11:42 [Bug c++/21619] New: [4.0/4.1 regression] __builtin_constant_p(&"Hello"[0])?1:-1 not compile-time constant rguenth at gcc dot gnu dot org
` (3 preceding siblings ...)
2005-06-01 8:16 ` rguenth at tat dot physik dot uni-tuebingen dot de
@ 2005-06-03 23:37 ` mmitchel at gcc dot gnu dot org
2005-06-05 16:33 ` cvs-commit at gcc dot gnu dot org
` (9 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2005-06-03 23:37 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |mark at codesourcery dot com
|dot org |
Status|NEW |ASSIGNED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21619
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug c++/21619] [4.0/4.1 regression] __builtin_constant_p(&"Hello"[0])?1:-1 not compile-time constant
2005-05-17 11:42 [Bug c++/21619] New: [4.0/4.1 regression] __builtin_constant_p(&"Hello"[0])?1:-1 not compile-time constant rguenth at gcc dot gnu dot org
` (4 preceding siblings ...)
2005-06-03 23:37 ` mmitchel at gcc dot gnu dot org
@ 2005-06-05 16:33 ` cvs-commit at gcc dot gnu dot org
2005-06-05 16:47 ` cvs-commit at gcc dot gnu dot org
` (8 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-06-05 16:33 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2005-06-05 16:33 -------
Subject: Bug 21619
CVSROOT: /cvs/gcc
Module name: gcc
Changes by: mmitchel@gcc.gnu.org 2005-06-05 16:33:45
Modified files:
gcc/cp : ChangeLog cp-tree.h parser.c tree.c
gcc/testsuite : ChangeLog
Added files:
gcc/testsuite/g++.dg/ext: builtin9.C
Log message:
PR c++/21619
* cp-tree.h (DECL_IS_BUILTIN_CONSTANT_P): New macro.
* parser.c (cp_parser_postfix_expression): Allow non-constant
expressions as arguments to __builtin_constant_p.
* tree.c (builtin_valid_in_constant_expr_p): Use
DECL_IS_BUILTIN_CONSTANT_P.
PR c++/21619
* g++.dg/ext/builtin9.C: New test.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcc&r1=1.4774&r2=1.4775
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/cp-tree.h.diff?cvsroot=gcc&r1=1.1140&r2=1.1141
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/parser.c.diff?cvsroot=gcc&r1=1.335&r2=1.336
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/tree.c.diff?cvsroot=gcc&r1=1.435&r2=1.436
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.5597&r2=1.5598
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/ext/builtin9.C.diff?cvsroot=gcc&r1=NONE&r2=1.1
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21619
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug c++/21619] [4.0/4.1 regression] __builtin_constant_p(&"Hello"[0])?1:-1 not compile-time constant
2005-05-17 11:42 [Bug c++/21619] New: [4.0/4.1 regression] __builtin_constant_p(&"Hello"[0])?1:-1 not compile-time constant rguenth at gcc dot gnu dot org
` (5 preceding siblings ...)
2005-06-05 16:33 ` cvs-commit at gcc dot gnu dot org
@ 2005-06-05 16:47 ` cvs-commit at gcc dot gnu dot org
2005-06-05 16:48 ` [Bug c++/21619] [4.0 " mmitchel at gcc dot gnu dot org
` (7 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-06-05 16:47 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2005-06-05 16:47 -------
Subject: Bug 21619
CVSROOT: /cvs/gcc
Module name: gcc
Branch: gcc-4_0-branch
Changes by: mmitchel@gcc.gnu.org 2005-06-05 16:46:54
Modified files:
gcc/cp : ChangeLog cp-tree.h parser.c tree.c
Log message:
PR c++/21619
* cp-tree.h (DECL_IS_BUILTIN_CONSTANT_P): New macro.
* parser.c (cp_parser_postfix_expression): Allow non-constant
expressions as arguments to __builtin_constant_p.
* tree.c (builtin_valid_in_constant_expr_p): Use
DECL_IS_BUILTIN_CONSTANT_P.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.4648.2.57&r2=1.4648.2.58
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/cp-tree.h.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.1106.2.7&r2=1.1106.2.8
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/parser.c.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.319.2.8&r2=1.319.2.9
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/tree.c.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.427.2.3&r2=1.427.2.4
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21619
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug c++/21619] [4.0 regression] __builtin_constant_p(&"Hello"[0])?1:-1 not compile-time constant
2005-05-17 11:42 [Bug c++/21619] New: [4.0/4.1 regression] __builtin_constant_p(&"Hello"[0])?1:-1 not compile-time constant rguenth at gcc dot gnu dot org
` (6 preceding siblings ...)
2005-06-05 16:47 ` cvs-commit at gcc dot gnu dot org
@ 2005-06-05 16:48 ` mmitchel at gcc dot gnu dot org
2005-06-05 16:49 ` mmitchel at gcc dot gnu dot org
` (6 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2005-06-05 16:48 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From mmitchel at gcc dot gnu dot org 2005-06-05 16:48 -------
4.0.1 has a patch to tolerate array accesses in __builtin_constant_p arguments,
but __builtin_constant_p never returns 1 for arguments of pointer type on the
4.0 branch, so the original test case still will not compile on 4.0. In 4.1,
__builtin_constant_p is more clever, so the test case does work there.
--
What |Removed |Added
----------------------------------------------------------------------------
Summary|[4.0/4.1 regression] |[4.0 regression]
|__builtin_constant_p(&"Hello|__builtin_constant_p(&"Hello
|"[0])?1:-1 not compile-time |"[0])?1:-1 not compile-time
|constant |constant
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21619
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug c++/21619] [4.0 regression] __builtin_constant_p(&"Hello"[0])?1:-1 not compile-time constant
2005-05-17 11:42 [Bug c++/21619] New: [4.0/4.1 regression] __builtin_constant_p(&"Hello"[0])?1:-1 not compile-time constant rguenth at gcc dot gnu dot org
` (7 preceding siblings ...)
2005-06-05 16:48 ` [Bug c++/21619] [4.0 " mmitchel at gcc dot gnu dot org
@ 2005-06-05 16:49 ` mmitchel at gcc dot gnu dot org
2005-06-05 17:00 ` rguenth at gcc dot gnu dot org
` (5 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2005-06-05 16:49 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From mmitchel at gcc dot gnu dot org 2005-06-05 16:49 -------
Unassigning from myself; this is now a middle-end bug.
--
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|mark at codesourcery dot com|unassigned at gcc dot gnu
| |dot org
Status|ASSIGNED |NEW
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21619
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug c++/21619] [4.0 regression] __builtin_constant_p(&"Hello"[0])?1:-1 not compile-time constant
2005-05-17 11:42 [Bug c++/21619] New: [4.0/4.1 regression] __builtin_constant_p(&"Hello"[0])?1:-1 not compile-time constant rguenth at gcc dot gnu dot org
` (8 preceding siblings ...)
2005-06-05 16:49 ` mmitchel at gcc dot gnu dot org
@ 2005-06-05 17:00 ` rguenth at gcc dot gnu dot org
2005-06-05 17:31 ` pinskia at gcc dot gnu dot org
` (4 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2005-06-05 17:00 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From rguenth at gcc dot gnu dot org 2005-06-05 17:00 -------
The middle-ends fold_builtin_constant_p routines are the same for 4.0 branch and
HEAD - can you point me to the difference you are seeing?
Thanks,
Richard.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21619
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug c++/21619] [4.0 regression] __builtin_constant_p(&"Hello"[0])?1:-1 not compile-time constant
2005-05-17 11:42 [Bug c++/21619] New: [4.0/4.1 regression] __builtin_constant_p(&"Hello"[0])?1:-1 not compile-time constant rguenth at gcc dot gnu dot org
` (9 preceding siblings ...)
2005-06-05 17:00 ` rguenth at gcc dot gnu dot org
@ 2005-06-05 17:31 ` pinskia at gcc dot gnu dot org
2005-06-05 17:35 ` mark at codesourcery dot com
` (3 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-06-05 17:31 UTC (permalink / raw)
To: gcc-bugs
------- 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 <rguenth@gcc.gnu.org>
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?
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |mmitchel at gcc dot gnu dot
| |org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21619
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug c++/21619] [4.0 regression] __builtin_constant_p(&"Hello"[0])?1:-1 not compile-time constant
2005-05-17 11:42 [Bug c++/21619] New: [4.0/4.1 regression] __builtin_constant_p(&"Hello"[0])?1:-1 not compile-time constant rguenth at gcc dot gnu dot org
` (10 preceding siblings ...)
2005-06-05 17:31 ` pinskia at gcc dot gnu dot org
@ 2005-06-05 17:35 ` mark at codesourcery dot com
2005-06-05 17:56 ` cvs-commit at gcc dot gnu dot org
` (2 subsequent siblings)
14 siblings, 0 replies; 16+ messages in thread
From: mark at codesourcery dot com @ 2005-06-05 17:35 UTC (permalink / raw)
To: gcc-bugs
------- 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 <rguenth@gcc.gnu.org>
>
> 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
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug c++/21619] [4.0 regression] __builtin_constant_p(&"Hello"[0])?1:-1 not compile-time constant
2005-05-17 11:42 [Bug c++/21619] New: [4.0/4.1 regression] __builtin_constant_p(&"Hello"[0])?1:-1 not compile-time constant rguenth at gcc dot gnu dot org
` (11 preceding siblings ...)
2005-06-05 17:35 ` mark at codesourcery dot com
@ 2005-06-05 17:56 ` cvs-commit at gcc dot gnu dot org
2005-06-05 17:57 ` mark at codesourcery dot com
2005-06-05 17:57 ` mmitchel at gcc dot gnu dot org
14 siblings, 0 replies; 16+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-06-05 17:56 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2005-06-05 17:56 -------
Subject: Bug 21619
CVSROOT: /cvs/gcc
Module name: gcc
Branch: gcc-4_0-branch
Changes by: mmitchel@gcc.gnu.org 2005-06-05 17:56:48
Modified files:
gcc/testsuite : ChangeLog
Added files:
gcc/testsuite/g++.dg/ext: builtin9.C
Log message:
PR c++/21619
* g++.dg/ext/builtin9.C: New test.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.5084.2.230&r2=1.5084.2.231
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/ext/builtin9.C.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=NONE&r2=1.1.2.1
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21619
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug c++/21619] [4.0 regression] __builtin_constant_p(&"Hello"[0])?1:-1 not compile-time constant
2005-05-17 11:42 [Bug c++/21619] New: [4.0/4.1 regression] __builtin_constant_p(&"Hello"[0])?1:-1 not compile-time constant rguenth at gcc dot gnu dot org
` (13 preceding siblings ...)
2005-06-05 17:57 ` mark at codesourcery dot com
@ 2005-06-05 17:57 ` mmitchel at gcc dot gnu dot org
14 siblings, 0 replies; 16+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2005-06-05 17:57 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From mmitchel at gcc dot gnu dot org 2005-06-05 17:57 -------
Fixed in 4.0.1.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21619
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug c++/21619] [4.0 regression] __builtin_constant_p(&"Hello"[0])?1:-1 not compile-time constant
2005-05-17 11:42 [Bug c++/21619] New: [4.0/4.1 regression] __builtin_constant_p(&"Hello"[0])?1:-1 not compile-time constant rguenth at gcc dot gnu dot org
` (12 preceding siblings ...)
2005-06-05 17:56 ` cvs-commit at gcc dot gnu dot org
@ 2005-06-05 17:57 ` mark at codesourcery dot com
2005-06-05 17:57 ` mmitchel at gcc dot gnu dot org
14 siblings, 0 replies; 16+ messages in thread
From: mark at codesourcery dot com @ 2005-06-05 17:57 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From mark at codesourcery dot com 2005-06-05 17:57 -------
Subject: Re: [4.0 regression] __builtin_constant_p(&"Hello"[0])?1:-1
not compile-time constant
mark at codesourcery dot com wrote:
> ------- 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 <rguenth@gcc.gnu.org>
>>
>> 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?
That was exactly the problem; I've now checked in the testcase and will
close the PR.
Thanks!
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21619
^ permalink raw reply [flat|nested] 16+ messages in thread
end of thread, other threads:[~2005-06-05 17:57 UTC | newest]
Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-05-17 11:42 [Bug c++/21619] New: [4.0/4.1 regression] __builtin_constant_p(&"Hello"[0])?1:-1 not compile-time constant rguenth at gcc dot gnu dot org
2005-05-17 11:43 ` [Bug c++/21619] " pinskia at gcc dot gnu dot org
2005-05-27 18:08 ` rguenth at gcc dot gnu dot org
2005-06-01 0:32 ` pinskia at gcc dot gnu dot org
2005-06-01 8:16 ` rguenth at tat dot physik dot uni-tuebingen dot de
2005-06-03 23:37 ` mmitchel at gcc dot gnu dot org
2005-06-05 16:33 ` cvs-commit at gcc dot gnu dot org
2005-06-05 16:47 ` cvs-commit at gcc dot gnu dot org
2005-06-05 16:48 ` [Bug c++/21619] [4.0 " mmitchel at gcc dot gnu dot org
2005-06-05 16:49 ` mmitchel at gcc dot gnu dot org
2005-06-05 17:00 ` rguenth at gcc dot gnu dot org
2005-06-05 17:31 ` pinskia at gcc dot gnu dot org
2005-06-05 17:35 ` mark at codesourcery dot com
2005-06-05 17:56 ` cvs-commit at gcc dot gnu dot org
2005-06-05 17:57 ` mark at codesourcery dot com
2005-06-05 17:57 ` mmitchel at gcc dot gnu dot org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).