public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/60951] New: [4.9 Regression][C++11] ICE with braced-init-list assignment and constexpr constructor
@ 2014-04-24 13:14 radiantstatue at gmail dot com
  2014-04-24 13:16 ` [Bug c++/60951] [4.9/4.10 " redi at gcc dot gnu.org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: radiantstatue at gmail dot com @ 2014-04-24 13:14 UTC (permalink / raw)
  To: gcc-bugs

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


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2014-05-03 20:39 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-04-24 13:14 [Bug c++/60951] New: [4.9 Regression][C++11] ICE with braced-init-list assignment and constexpr constructor radiantstatue at gmail dot com
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

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