Files
clang-p2996/mlir/test/Dialect/Func/invalid.mlir
River Riddle 412b8850f6 [mlir][NFC] Update textual references of func to func.func in Bufferization/Complex/EmitC/CF/Func/GPU tests
The special case parsing of `func` operations is being removed.
2022-04-20 22:17:28 -07:00

20 lines
525 B
MLIR

// RUN: mlir-opt -split-input-file %s -verify-diagnostics
func.func @unsupported_attribute() {
// expected-error @+1 {{invalid kind of attribute specified}}
%0 = constant "" : index
return
}
// -----
func.func private @return_i32_f32() -> (i32, f32)
func.func @call() {
// expected-error @+3 {{op result type mismatch at index 0}}
// expected-note @+2 {{op result types: 'f32', 'i32'}}
// expected-note @+1 {{function result types: 'i32', 'f32'}}
%0:2 = call @return_i32_f32() : () -> (f32, i32)
return
}