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++/57504] invalid this pointer passed in call to virtual function that returns a struct


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

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