This is the mail archive of the gcc-bugs@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]

[Bug c++/13387] assignment to base class corrupts subclass


------- Additional Comments From Tasso dot Karkanis at rogers dot com  2003-12-12 02:30 -------
My specs are:

# g++ -v  
Reading specs from /usr/lib/gcc-lib/x86_64-pc-linux-gnu/3.3.2/specs
Configured with: /var/tmp/portage/gcc-3.3.2-r2/work/gcc-3.3.2/configure
--prefix=/usr --bindir=/usr/x86_64-pc-linux-gnu/gcc-bin/3.3
--includedir=/usr/lib/gcc-lib/x86_64-pc-linux-gnu/3.3.2/include
--datadir=/usr/share/gcc-data/x86_64-pc-linux-gnu/3.3
--mandir=/usr/share/gcc-data/x86_64-pc-linux-gnu/3.3/man
--infodir=/usr/share/gcc-data/x86_64-pc-linux-gnu/3.3/info --enable-shared
--host=x86_64-pc-linux-gnu --target=x86_64-pc-linux-gnu --with-system-zlib
--enable-languages=c,c++,f77,objc --enable-threads=posix --enable-long-long
--disable-checking --enable-cstdio=stdio --enable-clocale=generic
--enable-__cxa_atexit --enable-version-specific-runtime-libs
--with-gxx-include-dir=/usr/lib/gcc-lib/x86_64-pc-linux-gnu/3.3.2/include/g++-v3
--with-local-prefix=/usr/local --enable-shared --enable-nls
--without-included-gettext --disable-multilib
Thread model: posix
gcc version 3.3.2 20031022 (Gentoo Linux 3.3.2-r2, propolice)


When I compile the attached program with "g++ corruptSubclass.cpp" and run it, I
get the output:

sub.d: 0

This problem is not confined to the AMD64 platform.  When I compile this program
on another machine with specs:

# g++ -v
Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/3.2/specs
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man
--infodir=/usr/share/info --enable-shared --enable-threads=posix
--disable-checking --host=i386-redhat-linux --with-system-zlib --enable-__cxa_atexit
Thread model: posix
gcc version 3.2 20020903 (Red Hat Linux 8.0 3.2-7)


I get the output:

sub.d: -125


-- 


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


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