[Bug c++/28951] New: [4.1.1 regression]runtime segfault with array assignment on i386-redhat-linux
When compiling with g++ 4.1.1 (shipping build on Fedora 5 i386), the following line cause runtime segmentation fault. voidAddElement (const T& val) { _array[Newidx()] = val; } A complete test case is attached below. The error also occurs on gcc 4.2.0 (built from snapshot, gcc version 4.2.0, Revision: 116178) Not occured on gcc 3.3.5 . -- Summary: [4.1.1 regression]runtime segfault with array assignment on i386-redhat-linux Product: gcc Version: 4.1.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: sourceinsight001 at gmail dot com GCC host triplet: i386-redhat-linux GCC target triplet: i386-redhat-linux http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28951
[Bug c++/28951] [4.1.1 regression]runtime segfault with array assignment on i386-redhat-linux
--- Comment #1 from sourceinsight001 at gmail dot com 2006-09-04 18:46 --- Created an attachment (id=12188) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=12188&action=view) [4.1.1 regression] runtime segfault with AddElement(): assignment of array element A complete test case -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28951
[Bug c++/28951] [4.1.1 regression]runtime segfault with array assignment on i386-redhat-linux
--- Comment #2 from sourceinsight001 at gmail dot com 2006-09-04 18:49 --- No special compilation option is used. It looks like this: g++ -c test_addelem.cxx -o test_addelem.o -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28951