This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/57504] invalid this pointer passed in call to virtual function that returns a struct
- From: "daniel.kruegler at googlemail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sun, 02 Jun 2013 12:30:04 +0000
- Subject: [Bug c++/57504] invalid this pointer passed in call to virtual function that returns a struct
- Auto-submitted: auto-generated
- References: <bug-57504-4 at http dot gcc dot gnu dot org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57504
Daniel KrÃgler <daniel.kruegler at googlemail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |daniel.kruegler@googlemail.
| |com
--- Comment #1 from Daniel KrÃgler <daniel.kruegler at googlemail dot com> ---
I tested your program with both gcc 4.7.2 and gcc 4.9.0 20130519 (experimental)
on my mingw-64-bit system after fixing the missing semicolon of the "cerr <<
this << endl" statement.
For the 64-bit-builds (-m64) both compilers return the same pointer values.
I can confirm that for -m32 I get indeed a pointer value difference using gcc
4.7.2 as you describe.
This difference does not occur for the -m64 version of any compiler and it does
not occur for -m32 using gcc 4.9.0 20130519 (experimental), so it seems to be
fixed on trunk.
You may want to test it with gcc 4.8, you can get a version for it from
http://www.equation.com/servlet/equation.cmd?fa=fortran