OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [tags/] [gnu-dev/] [fsf-gcc-snapshot-1-mar-12/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [tree-ssa/] [pr22488.C] - Rev 847

Go to most recent revision | Compare with Previous | Blame | View Log

// PR tree-optimization/22488
// This testcase is really a C++ FE bug in represnting virtual inheritance
// It gives the appearance to the middle end that the fields exist twice
// which resulted in a very confused structure analyzer
// { dg-do compile }
// { dg-options "-O" }
struct X
{
    int i0, i1;
      char c;
};

struct A
{
    int i;
      char c0, c1;

        virtual ~A();
};

struct B : virtual A {};

struct C : B
{
    X x;

      void bar(X y) { x = y; }
};

void foo()
{
    C().bar(X());
}

Go to most recent revision | Compare with Previous | Blame | View Log

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.