public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/21595] New: __builtin_constant_p(&"Hello"[0]) is true for C but not for C++
@ 2005-05-15 21:33 rguenth at gcc dot gnu dot org
2005-05-15 21:47 ` [Bug middle-end/21595] " rguenth at gcc dot gnu dot org
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2005-05-15 21:33 UTC (permalink / raw)
To: gcc-bugs
... because of different representations are passed to fold_builtin_constant_p.
--
Summary: __builtin_constant_p(&"Hello"[0]) is true for C but not
for C++
Product: gcc
Version: 4.1.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: middle-end
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
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21595
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug middle-end/21595] __builtin_constant_p(&"Hello"[0]) is true for C but not for C++
2005-05-15 21:33 [Bug middle-end/21595] New: __builtin_constant_p(&"Hello"[0]) is true for C but not for C++ rguenth at gcc dot gnu dot org
@ 2005-05-15 21:47 ` rguenth at gcc dot gnu dot org
2005-05-16 0:03 ` [Bug middle-end/21595] [4.0/4.1 Regression] " pinskia at gcc dot gnu dot org
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2005-05-15 21:47 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From rguenth at gcc dot gnu dot org 2005-05-15 21:47 -------
patch in testing
--
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |rguenth at gcc dot gnu dot
|dot org |org
Status|UNCONFIRMED |ASSIGNED
Ever Confirmed| |1
Last reconfirmed|0000-00-00 00:00:00 |2005-05-15 21:47:03
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21595
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug middle-end/21595] [4.0/4.1 Regression] __builtin_constant_p(&"Hello"[0]) is true for C but not for C++
2005-05-15 21:33 [Bug middle-end/21595] New: __builtin_constant_p(&"Hello"[0]) is true for C but not for C++ rguenth at gcc dot gnu dot org
2005-05-15 21:47 ` [Bug middle-end/21595] " rguenth at gcc dot gnu dot org
@ 2005-05-16 0:03 ` pinskia at gcc dot gnu dot org
2005-05-16 0:04 ` pinskia at gcc dot gnu dot org
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-05-16 0:03 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-05-16 00:02 -------
This is also a regression from 3.4.0.
--
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |missed-optimization
Known to fail| |4.0.0 4.1.0
Known to work| |3.4.0
Summary|__builtin_constant_p(&"Hello|[4.0/4.1 Regression]
|"[0]) is true for C but not |__builtin_constant_p(&"Hello
|for C++ |"[0]) is true for C but not
| |for C++
Target Milestone|--- |4.0.1
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21595
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug middle-end/21595] [4.0/4.1 Regression] __builtin_constant_p(&"Hello"[0]) is true for C but not for C++
2005-05-15 21:33 [Bug middle-end/21595] New: __builtin_constant_p(&"Hello"[0]) is true for C but not for C++ rguenth at gcc dot gnu dot org
2005-05-15 21:47 ` [Bug middle-end/21595] " rguenth at gcc dot gnu dot org
2005-05-16 0:03 ` [Bug middle-end/21595] [4.0/4.1 Regression] " pinskia at gcc dot gnu dot org
@ 2005-05-16 0:04 ` pinskia at gcc dot gnu dot org
2005-05-17 9:00 ` cvs-commit at gcc dot gnu dot org
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-05-16 0:04 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-05-16 00:04 -------
Here is a compile time testcase:
int f[__builtin_constant_p(&"Hello"[0])?1:-1];
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21595
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug middle-end/21595] [4.0/4.1 Regression] __builtin_constant_p(&"Hello"[0]) is true for C but not for C++
2005-05-15 21:33 [Bug middle-end/21595] New: __builtin_constant_p(&"Hello"[0]) is true for C but not for C++ rguenth at gcc dot gnu dot org
` (2 preceding siblings ...)
2005-05-16 0:04 ` pinskia at gcc dot gnu dot org
@ 2005-05-17 9:00 ` cvs-commit at gcc dot gnu dot org
2005-05-17 11:42 ` [Bug middle-end/21595] [4.0 " rguenth at gcc dot gnu dot org
2005-05-27 18:12 ` rguenth at gcc dot gnu dot org
5 siblings, 0 replies; 7+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-05-17 9:00 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2005-05-17 09:00 -------
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
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21595
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug middle-end/21595] [4.0 Regression] __builtin_constant_p(&"Hello"[0]) is true for C but not for C++
2005-05-15 21:33 [Bug middle-end/21595] New: __builtin_constant_p(&"Hello"[0]) is true for C but not for C++ rguenth at gcc dot gnu dot org
` (3 preceding siblings ...)
2005-05-17 9:00 ` cvs-commit at gcc dot gnu dot org
@ 2005-05-17 11:42 ` rguenth at gcc dot gnu dot org
2005-05-27 18:12 ` rguenth at gcc dot gnu dot org
5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2005-05-17 11:42 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
OtherBugsDependingO| |21619
nThis| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21595
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug middle-end/21595] [4.0 Regression] __builtin_constant_p(&"Hello"[0]) is true for C but not for C++
2005-05-15 21:33 [Bug middle-end/21595] New: __builtin_constant_p(&"Hello"[0]) is true for C but not for C++ rguenth at gcc dot gnu dot org
` (4 preceding siblings ...)
2005-05-17 11:42 ` [Bug middle-end/21595] [4.0 " rguenth at gcc dot gnu dot org
@ 2005-05-27 18:12 ` rguenth at gcc dot gnu dot org
5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2005-05-27 18:12 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From rguenth at gcc dot gnu dot org 2005-05-27 18:08 -------
Fixed for 4.0.1.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21595
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2005-05-27 18:08 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-05-15 21:33 [Bug middle-end/21595] New: __builtin_constant_p(&"Hello"[0]) is true for C but not for C++ rguenth at gcc dot gnu dot org
2005-05-15 21:47 ` [Bug middle-end/21595] " rguenth at gcc dot gnu dot org
2005-05-16 0:03 ` [Bug middle-end/21595] [4.0/4.1 Regression] " pinskia at gcc dot gnu dot org
2005-05-16 0:04 ` pinskia at gcc dot gnu dot org
2005-05-17 9:00 ` cvs-commit at gcc dot gnu dot org
2005-05-17 11:42 ` [Bug middle-end/21595] [4.0 " rguenth at gcc dot gnu dot org
2005-05-27 18:12 ` rguenth 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).