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++/40997] Wrong address returned in covariant return



------- Comment #1 from rguenth at gcc dot gnu dot org  2009-08-07 12:01 -------
What is the expected output and what is the wrong output you see?

The Intel compiler produces

BaseIf@0x7fffffffdd88
Bar@0x7fffffffdd98
bart:   0x7fffffffdd88
baseIf: 0x7fffffffdd88
bar:    0x7fffffffdd98
baseIf2:0x7fffffffdd88
bart.getBaseVal():   4711
baseIf.getBaseVal(): 4711
bar.getBaseVal():    4711
baseIf2.getBaseVal():4711
outer:0x7fffffffdd88
bar:   0x7fffffffdd88
t: t.C:70: int Bar::InnerBar::getVal(): Assertion `&bar == Bar::instance'
failed.
Aborted

so I'm not sure your expectations are valid.


-- 


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


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