public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "rguenth at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/21619] New: [4.0/4.1 regression] __builtin_constant_p(&"Hello"[0])?1:-1 not compile-time constant
Date: Tue, 17 May 2005 11:42:00 -0000	[thread overview]
Message-ID: <20050517114202.21619.rguenth@gcc.gnu.org> (raw)

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


             reply	other threads:[~2005-05-17 11:42 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-05-17 11:42 rguenth at gcc dot gnu dot org [this message]
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 ` mmitchel at gcc dot gnu dot org
2005-06-05 17:57 ` mark at codesourcery dot com

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20050517114202.21619.rguenth@gcc.gnu.org \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).