This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
[ICE] g++-3.3.2
- From: Rene Rebe <rene at rocklinux dot org>
- To: gcc at gcc dot gnu dot org
- Cc: ziegler at informatik dot hu-berlin dot de
- Date: Sun, 02 Nov 2003 12:37:28 +0100 (CET)
- Subject: [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