From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21392 invoked by alias); 12 Feb 2013 07:26:24 -0000 Received: (qmail 21259 invoked by uid 48); 12 Feb 2013 07:26:07 -0000 From: "freddie_chopin at op dot pl" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/56291] ICE for C++11 in output_constructor_regular_field, at varasm.c:4821 Date: Tue, 12 Feb 2013 07:26: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: ice-on-valid-code X-Bugzilla-Severity: normal X-Bugzilla-Who: freddie_chopin at op dot pl 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: CC 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" 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-02/txt/msg01132.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56291 Freddie Chopin changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |freddie_chopin at op dot pl --- Comment #3 from Freddie Chopin 2013-02-12 07:26:05 UTC --- (In reply to comment #1) > Current mainline and 4_7-branch work for me. The weird thing is, stock 4.7.2 > also works fine for me - I think this is essentially a duplicate of c++/54253. > Are you sure you are using a stock FSF 4.7.2? First of all, I've just noticed that in my example code the last newline is missing, so a very important last line (that creates the object - without it there's no problem too) got merged with the shell prompt. To be really sure, I'm pasting the example again: // starts here class Base { public: constexpr Base() : v(1) {}; int v; }; class Derived : public Base { public: constexpr Derived() : Base() {}; virtual void function(); }; Derived d; // ends here Sorry about that thing not being clearly stated in the first message. I've also added an attachment this time, so there's no way to miss this last line. As for your questions and suggestions. First of all this is not related to the bug you mentioned - all three testcases attached there work for me without a problem (I tested like this - g++ -std=c++11 -c -o ), and from the description I think the problem was a segfault, while I have a ICE report coming from gcc_assert(). Am I using a vanilla GCC - that's a good question (; The bare-metal ARM compiler (the one I work most of the time and on which I noticed the problem) comes directly from /branches/ARM/embedded-4_7-branch and I have 2 versions of it (both fail). I also have another ARM compiler that's probably from this branch too (but I'm not sure), and it fails there too. A compiler from previous branch - /branches/ARM/embedded-4_6-branch - also fails. As for the "g++" on Linux, I have no idea whether this is vanilla or modified for Arch package - any way I can check that (other than comparing source code (; )? I definetely reports just as "4.7.2"... When I look at the source code for varasm.c in the 4.7 branch all I can tell is that at least the line of the report I'm seeing matches the line in the code; --- /* Advance to offset of this element. Note no alignment needed in an array, since that is guaranteed if each element has the proper size. */ if ((local->field != NULL_TREE || local->index != NULL_TREE) && fieldpos != local->total_bytes) { gcc_assert (fieldpos >= local->total_bytes); // this is line 4821 which reports ICE assemble_zeros (fieldpos - local->total_bytes); local->total_bytes = fieldpos; } --- Is there anywhere I could download a "really stock package" of GCC in binary form to check it (I'm not an expert, just a user, so compiling that myself is rather hard...) - for Linux or Windows?