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

             Bug #: 50973
           Summary: [C++11] internal compiler error defaulted destructor
                    virtual inheritance
    Classification: Unclassified
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassig...@gcc.gnu.org
        ReportedBy: jarr...@cse.unsw.edu.au


The following code causes an internal compiler error:


class HD
{
  public:
  virtual ~HD() {};
};
class InputHD : public virtual HD
{
};
class OutputHD : public virtual HD
{
};
class IOHD : public InputHD, public OutputHD
{
};
template <typename T, unsigned int N>
class ArrayNHD : public IOHD
{
  public:
  ~ArrayNHD() = default;
};
class TLText
{
  ~TLText();
  ArrayNHD<int, 1>* m_argsHD;
};
TLText::~TLText()
{
  delete m_argsHD;
}


g++ -std=gnu++11 -c tltext-min4.ii

tltext-min4.ii:29:1: internal compiler error: in
function_and_variable_visibility, at ipa.c:869
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.


gcc -v

Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/home/jarrydb/current/soft/install-latest/libexec/gcc/x86_64-unknown-linux-gnu/4.7.0/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: /home/jarrydb/current/soft/src/gcc-git/configure
--prefix=/home/jarrydb/current/soft/install-latest --disable-multilib
--enable-languages=c,c++
Thread model: posix
gcc version 4.7.0 20111102 (experimental) (GCC)

Reply via email to