public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "radiantstatue at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/60951] New: [4.9 Regression][C++11] ICE with braced-init-list assignment and constexpr constructor
Date: Thu, 24 Apr 2014 13:14:00 -0000	[thread overview]
Message-ID: <bug-60951-4@http.gcc.gnu.org/bugzilla/> (raw)

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=60951

            Bug ID: 60951
           Summary: [4.9 Regression][C++11] ICE with braced-init-list
                    assignment and constexpr constructor
           Product: gcc
           Version: 4.9.0
            Status: UNCONFIRMED
          Severity: major
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: radiantstatue at gmail dot com

Test case:
struct Foo {
  constexpr Foo(int x = 0) : memb(x) {}
  int memb;
};

struct FooContainer {
  Foo foo[2];
};

void fubar() {
  int nonConst = 0;
  FooContainer fooContainer;
  fooContainer = { { 0, nonConst } };
}

$ g++ -std=c++11 -S testcase.cpp
testcase.cpp: In function ‘void fubar()’:
testcase.cpp:13:37: internal compiler error: in gimplify_init_ctor_preeval, at
gimplify.c:3320
   fooContainer = { { 0, nonConst } };
                                     ^

The error happens if mixed const/non-const expressions are used in the braced
init list.
>From gcc-bugs-return-449806-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Thu Apr 24 13:14:51 2014
Return-Path: <gcc-bugs-return-449806-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 26012 invoked by alias); 24 Apr 2014 13:14:51 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 25982 invoked by uid 48); 24 Apr 2014 13:14:47 -0000
From: "radiantstatue at gmail dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/60951] [4.9 Regression][C++11] ICE with braced-init-list assignment and constexpr constructor
Date: Thu, 24 Apr 2014 13:14:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: c++
X-Bugzilla-Version: 4.9.0
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: radiantstatue at gmail dot com
X-Bugzilla-Status: UNCONFIRMED
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: bug_severity
Message-ID: <bug-60951-4-ZXm3EyvWkG@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-60951-4@http.gcc.gnu.org/bugzilla/>
References: <bug-60951-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2014-04/txt/msg01826.txt.bz2
Content-length: 281

http://gcc.gnu.org/bugzilla/show_bug.cgi?id`951

radiantstatue at gmail dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|major                       |normal


             reply	other threads:[~2014-04-24 13:14 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-24 13:14 radiantstatue at gmail dot com [this message]
2014-04-24 13:16 ` [Bug c++/60951] [4.9/4.10 " redi at gcc dot gnu.org
2014-04-24 14:12 ` jakub at gcc dot gnu.org
2014-04-29 20:58 ` jason at gcc dot gnu.org
2014-04-30 14:23 ` jason at gcc dot gnu.org
2014-04-30 14:24 ` jason at gcc dot gnu.org
2014-04-30 14:24 ` jason at gcc dot gnu.org
2014-05-03 20:39 ` jason at gcc dot gnu.org

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=bug-60951-4@http.gcc.gnu.org/bugzilla/ \
    --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).