blob: b32eb6a87179249c350889c7395ae7f4105b5d32 [file] [log] [blame]
// RUN: mlir-opt -split-input-file -verify-diagnostics %s
func.func @invalid_cast(%a: index) {
// expected-error @below {{cast incompatible}}
%0 = index.casts %a : index to index
return
}
// -----
func.func @invalid_cast(%a: i64) {
// expected-error @below {{cast incompatible}}
%0 = index.casts %a : i64 to i64
return
}
// -----
func.func @invalid_cast(%a: index) {
// expected-error @below {{cast incompatible}}
%0 = index.castu %a : index to index
return
}
// -----
func.func @invalid_cast(%a: i64) {
// expected-error @below {{cast incompatible}}
%0 = index.castu %a : i64 to i64
return
}