This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[ICE] g++-3.3.2


Hi,

I found a suspect snipset of (maybe unlegal) C++ code that seg-faults
G++ 3.3.2 (PowerPC, self-build, ROCK Linux):

#include <iostream>

struct state
{
  std::string name;
  bool av;
};

int main ()
{
        state st;
        st = (state) { "a", true };
        std::cout << st.name << std::endl;
}

The "st = (state) { "a", true };" line is the one that crashes g++:

rene@idefix:~/develop/gsmp-trunk$ g++-33  smash-g++.cc
g++-33: Internal error: Segmentation fault (program cc1plus)
Please submit a full bug report.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.

The same code compiles fine with previous versions of g++ (e.g. 3.2.3)
and even produces working code (although I do not know if the above
static C cast is valid for assigning this non-POD struct ...)

Sincerely yours,
  René Rebe
    - ROCK Linux stable release maintainer

--  
René Rebe - Europe/Germany/Berlin
  rene@rocklinux.org rene@rocklinux-consulting.de
http://www.rocklinux.org http://www.rocklinux-consulting.de
http://gsmp.tfh-berlin.de/gsmp http://gsmp.tfh-berlin.de/rene


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]