aboutsummaryrefslogtreecommitdiff
path: root/mlir/test/IR/invalid-module-op.mlir
blob: 819da8ee84dd25d301ac53b111a623d0785138ad (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
// 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} {
}