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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.old-deja/] [g++.law/] [operators16.C] - Rev 699

Compare with Previous | Blame | View Log

// { dg-do run  }
// GROUPS passed operators
// copy file
// From: gfm@mencon.mencon.oz.au (Graham Menhennitt)
// Date:     Thu, 29 Apr 93 20:53:07 EST
// Subject:  4 bugs in g++ 2.3.3
// Message-ID: <9304291053.AA00090@mencon>

#include <stdio.h>

int pass = 0;
struct A {
        A(void) {}
        A(const A& a) { ; }
        A& operator = (const A& a) { pass = 1; return *this; }
};

struct B {
        B(const A& aa) { B::a = aa; }
        A a;
};

int main(void)
{
        B b = A();
        if (pass)
                printf ("PASS\n");
        else
                { printf ("FAIL\n"); return 1; }
}

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.