From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1786 invoked by alias); 8 Jan 2013 19:31:02 -0000 Received: (qmail 1726 invoked by uid 48); 8 Jan 2013 19:30:31 -0000 From: "npl at chello dot at" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/55879] [C++11] nested constexpr Initialisation raises internal compiler error Date: Tue, 08 Jan 2013 19:31: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-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: npl at chello dot at X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2013-01/txt/msg00699.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D55879 --- Comment #2 from npl at chello dot at 2013-01-08 19:30:29 UTC --- (In reply to comment #1) > The problem also occurs for gcc 4.8.0 20121209 (experimental). Let me rem= ark > that according to C++11 the variable s_Memmap could not be used in consta= nt > expressions, because it contains an (effective) reinterpret_cast, which i= s not > allowed in this context. If I understand you right, then you mean that the s_Memmap is not an "constexpr" array. As far as I understand this is not an issue that schould prevent compiling - I believe constexpr arrays are valid and different to c= onst arrays? The former should not compile with this initializer. Also this variable is an linkervariable in my project, and I dont think gcc could "constexpr" it... even if I might be able to do away with the cast wi= th something like extern "C" const unsigned _lnkDDRRAM[]; btw here is my error output for 4.7.2: nestedconstexpr.cpp:35:1: in constexpr expansion of =E2=80=98CNested(CAddress(1107296256u))=E2=80=99 nestedconstexpr.cpp:22:26: in constexpr expansion of =E2=80=98((CNested*)this)->CNested::m_PrimaryBlock.CAddress::CAddress((* & = primary))=E2=80=99 nestedconstexpr.cpp:35:1: internal compiler error: in cxx_eval_indirect_ref= , at cp/semantics.c:7435