URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Subversion Repositories openrisc
[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.old-deja/] [g++.pt/] [crash10.C] - Rev 749
Go to most recent revision | Compare with Previous | Blame | View Log
// { dg-do assemble }
template<int M, int N>
class GCD {
public:
enum { val = (N == 0) ? M : GCD<N, M % N>::val }; // { dg-warning "division" "division" }
// { dg-error "constant expression" "valid" { target *-*-* } 6 }
// { dg-message "template argument" "valid" { target *-*-* } 6 }
};
int main() {
GCD< 1, 0 >::val; // { dg-message "required" }
}
Go to most recent revision | Compare with Previous | Blame | View Log