public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/55367] New: Probably problem with c++ vptr under templates and multiple ihenritance
@ 2012-11-17 16:22 wriabi at email dot com
  2012-11-17 23:21 ` [Bug c++/55367] Probably problem with c++ vptr under templates and multiple inheritance paolo.carlini at oracle dot com
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: wriabi at email dot com @ 2012-11-17 16:22 UTC (permalink / raw)
  To: gcc-bugs


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

             Bug #: 55367
           Summary: Probably problem with c++ vptr under templates and
                    multiple ihenritance
    Classification: Unclassified
           Product: gcc
           Version: 4.7.2
            Status: UNCONFIRMED
          Severity: critical
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: wriabi@email.com


Created attachment 28720
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=28720
code snippet

Hello,
I have some code that compile and work fine in gcc 4.6.2 (without tne new
keyword "override" ) but in version 4.7.2 it complie generate access violation
runtime. under windows platform.

So, i need some help, thank you very much:

#include <iostream>
using namespace std;

struct Entity {
    //~Entity() = default; //work fine
    ~Entity() {} //when i specified my destructor this compile but generate
runtime access viloation
};

template<typename T>
struct IRepository { virtual T g() = 0; };

struct OtherInterface{ virtual void y() = 0; };

struct IEntityRepository : public virtual IRepository<Entity>{ };

template<typename T>
struct RepositoryBase : public virtual IRepository<T>, public OtherInterface{
    virtual void y()  override { cout << "y() override called" << endl; }
};

template<typename T>
struct DataRepository : public RepositoryBase<T>{
    virtual T f() { cout << "f() called" << endl; this->y(); T t; return t; }
        T g() override {
        cout << "g() override called" << endl;
        ////when i specified my destructor for class Entity this compile but
generate runtime access viloation here : on this: probably problem with vptr
        return this->f(); }
};

struct EffectiveEntityRepository : public DataRepository<Entity>, public
IEntityRepository{
};

int main() {
    IEntityRepository* var = new EffectiveEntityRepository();
    var->g();
    return 1;
}


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug c++/55367] Probably problem with c++ vptr under templates and multiple inheritance
  2012-11-17 16:22 [Bug c++/55367] New: Probably problem with c++ vptr under templates and multiple ihenritance wriabi at email dot com
@ 2012-11-17 23:21 ` paolo.carlini at oracle dot com
  2012-11-18 14:05 ` paolo.carlini at oracle dot com
                   ` (8 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: paolo.carlini at oracle dot com @ 2012-11-17 23:21 UTC (permalink / raw)
  To: gcc-bugs


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

Paolo Carlini <paolo.carlini at oracle dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|critical                    |normal


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug c++/55367] Probably problem with c++ vptr under templates and multiple inheritance
  2012-11-17 16:22 [Bug c++/55367] New: Probably problem with c++ vptr under templates and multiple ihenritance wriabi at email dot com
  2012-11-17 23:21 ` [Bug c++/55367] Probably problem with c++ vptr under templates and multiple inheritance paolo.carlini at oracle dot com
@ 2012-11-18 14:05 ` paolo.carlini at oracle dot com
  2012-11-18 19:41 ` wriabi at email dot com
                   ` (7 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: paolo.carlini at oracle dot com @ 2012-11-18 14:05 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #1 from Paolo Carlini <paolo.carlini at oracle dot com> 2012-11-18 14:04:00 UTC ---
Does it happen only on Windows? Which kind of system exactly, mingw, Cygwin? In
case should be <target>, as Component


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug c++/55367] Probably problem with c++ vptr under templates and multiple inheritance
  2012-11-17 16:22 [Bug c++/55367] New: Probably problem with c++ vptr under templates and multiple ihenritance wriabi at email dot com
  2012-11-17 23:21 ` [Bug c++/55367] Probably problem with c++ vptr under templates and multiple inheritance paolo.carlini at oracle dot com
  2012-11-18 14:05 ` paolo.carlini at oracle dot com
@ 2012-11-18 19:41 ` wriabi at email dot com
  2012-11-18 19:43 ` wriabi at email dot com
                   ` (6 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: wriabi at email dot com @ 2012-11-18 19:41 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #2 from walid riabi <wriabi at email dot com> 2012-11-18 19:41:00 UTC ---
I just tried that with the latest version (4.7.2) of MingW under windows 8


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug c++/55367] Probably problem with c++ vptr under templates and multiple inheritance
  2012-11-17 16:22 [Bug c++/55367] New: Probably problem with c++ vptr under templates and multiple ihenritance wriabi at email dot com
                   ` (2 preceding siblings ...)
  2012-11-18 19:41 ` wriabi at email dot com
@ 2012-11-18 19:43 ` wriabi at email dot com
  2012-11-18 19:47 ` pluto at agmk dot net
                   ` (5 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: wriabi at email dot com @ 2012-11-18 19:43 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #3 from walid riabi <wriabi at email dot com> 2012-11-18 19:43:25 UTC ---
I just tried that with the latest version (4.7.2) of MingW under windows 8


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug c++/55367] Probably problem with c++ vptr under templates and multiple inheritance
  2012-11-17 16:22 [Bug c++/55367] New: Probably problem with c++ vptr under templates and multiple ihenritance wriabi at email dot com
                   ` (3 preceding siblings ...)
  2012-11-18 19:43 ` wriabi at email dot com
@ 2012-11-18 19:47 ` pluto at agmk dot net
  2012-11-18 21:05 ` paolo.carlini at oracle dot com
                   ` (4 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: pluto at agmk dot net @ 2012-11-18 19:47 UTC (permalink / raw)
  To: gcc-bugs


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

Pawel Sikora <pluto at agmk dot net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |pluto at agmk dot net

--- Comment #4 from Pawel Sikora <pluto at agmk dot net> 2012-11-18 19:46:59 UTC ---
looks like PR55171


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug c++/55367] Probably problem with c++ vptr under templates and multiple inheritance
  2012-11-17 16:22 [Bug c++/55367] New: Probably problem with c++ vptr under templates and multiple ihenritance wriabi at email dot com
                   ` (4 preceding siblings ...)
  2012-11-18 19:47 ` pluto at agmk dot net
@ 2012-11-18 21:05 ` paolo.carlini at oracle dot com
  2012-11-19 19:48 ` wriabi at email dot com
                   ` (3 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: paolo.carlini at oracle dot com @ 2012-11-18 21:05 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #5 from Paolo Carlini <paolo.carlini at oracle dot com> 2012-11-18 21:05:23 UTC ---
Indeed it does, but we badly need a mingw maintainer to resolve this (or these)
issues


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug c++/55367] Probably problem with c++ vptr under templates and multiple inheritance
  2012-11-17 16:22 [Bug c++/55367] New: Probably problem with c++ vptr under templates and multiple ihenritance wriabi at email dot com
                   ` (5 preceding siblings ...)
  2012-11-18 21:05 ` paolo.carlini at oracle dot com
@ 2012-11-19 19:48 ` wriabi at email dot com
  2012-11-23 21:51 ` paolo.carlini at oracle dot com
                   ` (2 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: wriabi at email dot com @ 2012-11-19 19:48 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #6 from walid riabi <wriabi at email dot com> 2012-11-19 19:48:12 UTC ---
I'm a candidate:)


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug c++/55367] Probably problem with c++ vptr under templates and multiple inheritance
  2012-11-17 16:22 [Bug c++/55367] New: Probably problem with c++ vptr under templates and multiple ihenritance wriabi at email dot com
                   ` (6 preceding siblings ...)
  2012-11-19 19:48 ` wriabi at email dot com
@ 2012-11-23 21:51 ` paolo.carlini at oracle dot com
  2012-11-23 21:57 ` paolo.carlini at oracle dot com
  2012-11-24 11:52 ` ktietz at gcc dot gnu.org
  9 siblings, 0 replies; 11+ messages in thread
From: paolo.carlini at oracle dot com @ 2012-11-23 21:51 UTC (permalink / raw)
  To: gcc-bugs


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

Paolo Carlini <paolo.carlini at oracle dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |blitzmunter at gmail dot
                   |                            |com

--- Comment #7 from Paolo Carlini <paolo.carlini at oracle dot com> 2012-11-23 21:51:10 UTC ---
*** Bug 55453 has been marked as a duplicate of this bug. ***


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug c++/55367] Probably problem with c++ vptr under templates and multiple inheritance
  2012-11-17 16:22 [Bug c++/55367] New: Probably problem with c++ vptr under templates and multiple ihenritance wriabi at email dot com
                   ` (7 preceding siblings ...)
  2012-11-23 21:51 ` paolo.carlini at oracle dot com
@ 2012-11-23 21:57 ` paolo.carlini at oracle dot com
  2012-11-24 11:52 ` ktietz at gcc dot gnu.org
  9 siblings, 0 replies; 11+ messages in thread
From: paolo.carlini at oracle dot com @ 2012-11-23 21:57 UTC (permalink / raw)
  To: gcc-bugs


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

Paolo Carlini <paolo.carlini at oracle dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |DUPLICATE

--- Comment #8 from Paolo Carlini <paolo.carlini at oracle dot com> 2012-11-23 21:57:11 UTC ---
Dup.

*** This bug has been marked as a duplicate of bug 55171 ***


^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Bug c++/55367] Probably problem with c++ vptr under templates and multiple inheritance
  2012-11-17 16:22 [Bug c++/55367] New: Probably problem with c++ vptr under templates and multiple ihenritance wriabi at email dot com
                   ` (8 preceding siblings ...)
  2012-11-23 21:57 ` paolo.carlini at oracle dot com
@ 2012-11-24 11:52 ` ktietz at gcc dot gnu.org
  9 siblings, 0 replies; 11+ messages in thread
From: ktietz at gcc dot gnu.org @ 2012-11-24 11:52 UTC (permalink / raw)
  To: gcc-bugs


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

Kai Tietz <ktietz at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ktietz at gcc dot gnu.org

--- Comment #9 from Kai Tietz <ktietz at gcc dot gnu.org> 2012-11-24 11:52:24 UTC ---
(In reply to comment #8)
> Dup.
> 
> *** This bug has been marked as a duplicate of bug 55171 ***

Hmm, indeed a dup.  It seems to be related to the thunk-code for thiscall.  I
will take a look to it.


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2012-11-24 11:52 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-11-17 16:22 [Bug c++/55367] New: Probably problem with c++ vptr under templates and multiple ihenritance wriabi at email dot com
2012-11-17 23:21 ` [Bug c++/55367] Probably problem with c++ vptr under templates and multiple inheritance paolo.carlini at oracle dot com
2012-11-18 14:05 ` paolo.carlini at oracle dot com
2012-11-18 19:41 ` wriabi at email dot com
2012-11-18 19:43 ` wriabi at email dot com
2012-11-18 19:47 ` pluto at agmk dot net
2012-11-18 21:05 ` paolo.carlini at oracle dot com
2012-11-19 19:48 ` wriabi at email dot com
2012-11-23 21:51 ` paolo.carlini at oracle dot com
2012-11-23 21:57 ` paolo.carlini at oracle dot com
2012-11-24 11:52 ` ktietz at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).