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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [template/] [crash107.C] - Rev 693

Compare with Previous | Blame | View Log

// PR c++/44625
// { dg-do compile }
// { dg-options "" }

template<typename FP_> struct Vec { // { dg-message "note" }
    Vec& operator^=(Vec& rhs)     {
        union {
            struct {FP_ x,y,z;};
        }; // { dg-error "anonymous struct" }
        X = y*rhs.z() - z*rhs.y(); // { dg-error "not declared|no member" }
    }
    Vec& operator^(Vec& rhs) {
        return Vec(*this)^=rhs; // { dg-message "required" }
    }
};
Vec<double> v(3,4,12); // { dg-error "no matching" }
// { dg-message "note" { target *-*-* } 16 }
Vec<double> V(12,4,3);  // { dg-error "no matching" }
// { dg-message "note" { target *-*-* } 18 }
Vec<double> c = v^V;   // { dg-message "required" }

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.