1// RUN: mlir-opt %s -split-input-file -verify-diagnostics
2
3func.func @illegal_opaque_type_1() {
4    // expected-error @+1 {{expected non empty string in !emitc.opaque type}}
5    %1 = "emitc.variable"(){value = "42" : !emitc.opaque<"">} : () -> !emitc.opaque<"mytype">
6}
7
8// -----
9
10func.func @illegal_opaque_type_2() {
11    // expected-error @+1 {{pointer not allowed as outer type with !emitc.opaque, use !emitc.ptr instead}}
12    %1 = "emitc.variable"(){value = "nullptr" : !emitc.opaque<"int32_t*">} : () -> !emitc.opaque<"int32_t*">
13}
14