llvm-project/mlir/test/IR/invalid-module-op.mlir
River Riddle 6a99d29022 [mlir][NFC] Update textual references of func to func.func in IR/Interface tests
The special case parsing of `func` operations is being removed.
2022-04-20 22:17:30 -07:00

32 lines
561 B
MLIR

// RUN: mlir-opt %s -split-input-file -verify-diagnostics
// -----
func.func @module_op() {
// expected-error@+1 {{'builtin.module' op expects region #0 to have 0 or 1 blocks}}
builtin.module {
^bb1:
"test.dummy"() : () -> ()
^bb2:
"test.dummy"() : () -> ()
}
return
}
// -----
func.func @module_op() {
// expected-error@+1 {{region should have no arguments}}
builtin.module {
^bb1(%arg: i32):
}
return
}
// -----
// expected-error@+1 {{can only contain attributes with dialect-prefixed names}}
module attributes {attr} {
}