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

Subversion Repositories openrisc

[/] [openrisc/] [tags/] [gnu-src/] [gcc-4.5.1/] [gcc-4.5.1-or32-1.0rc1/] [gcc/] [testsuite/] [g++.old-deja/] [g++.robertl/] [eb97.C] - Rev 338

Compare with Previous | Blame | View Log

// { dg-do run  }
// Creates bad assembly on sparc and x86
template<unsigned long SIZE>
struct Array { };

template<unsigned long SIZE>
Array<SIZE> test_ok(const Array<SIZE>& a) {
    Array<SIZE> result;
    return(result);
}

template<unsigned long SIZE>
Array<SIZE + 1> test_error(const Array<SIZE>& a) {
    Array<SIZE + 1> result;
    return(result);
}

int main(int argc, char* argv[]) {
    Array<2> a;

    test_ok(a);
    test_error(a); // <<< MARKED LINE!

    return(0);
}

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.