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



Freddie Chopin <freddie_chopin at op dot pl> changed:



           What    |Removed                     |Added

----------------------------------------------------------------------------

                 CC|                            |freddie_chopin at op dot pl



--- Comment #3 from Freddie Chopin <freddie_chopin at op dot pl> 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 <filename> -o

<output_filename>), 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?

Reply via email to