public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/38215]  New: g++ internal compiler error
@ 2008-11-21 16:22 vikas dot saroha at gmail dot com
  2008-11-21 16:31 ` [Bug c++/38215] " paolo dot carlini at oracle dot com
  0 siblings, 1 reply; 2+ messages in thread
From: vikas dot saroha at gmail dot com @ 2008-11-21 16:22 UTC (permalink / raw)
  To: gcc-bugs

g++ inherit.cpp
inherit.cpp:15: Internal compiler error.
inherit.cpp:15: Please submit a full bug report.
inherit.cpp:15: See <URL:http://www.gnu.org/software/gcc/bugs.html> for
instructions.

#include<iostream>

class A
{ 
  protected:
  int a_v;
};

class B:public A
{
  protected :
  int b_v;
};

class A::A()
{
 a_v=10;
 cout<<"ctr A"<<endl;
}

class B::B()
{
  b_v=15;
  cout<<"ctr B"<<endl;
}

class A::~A()
{cout<<"Dtr A"<<endl;}
class B::~B()
{cout<<"Dtr B"<<endl;}


main()
{
  A x;
  B y;
  cout<<x.a_v<<endl;
  cout<<y.b_v<<endl;
  return 0;
}


-- 
           Summary: g++ internal compiler error
           Product: gcc
           Version: 2.95.3
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: vikas dot saroha at gmail dot com


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


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

* [Bug c++/38215] g++ internal compiler error
  2008-11-21 16:22 [Bug c++/38215] New: g++ internal compiler error vikas dot saroha at gmail dot com
@ 2008-11-21 16:31 ` paolo dot carlini at oracle dot com
  0 siblings, 0 replies; 2+ messages in thread
From: paolo dot carlini at oracle dot com @ 2008-11-21 16:31 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from paolo dot carlini at oracle dot com  2008-11-21 16:30 -------
This is correctly rejected without ICE by any modern-era, maintained, GCC.


-- 

paolo dot carlini at oracle dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
      Known to work|                            |4.2.5 4.3.1 4.4.0
         Resolution|                            |WORKSFORME


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


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

end of thread, other threads:[~2008-11-21 16:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-11-21 16:22 [Bug c++/38215] New: g++ internal compiler error vikas dot saroha at gmail dot com
2008-11-21 16:31 ` [Bug c++/38215] " paolo dot carlini at oracle dot com

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).