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

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).