blob: 2cd261c9622f70e5ac5115ec6896557280fae969 [file] [edit]
// RUN: cir-opt %s -verify-diagnostics -split-input-file
module {
// Should not copy types with no data layout (unkonwn byte size).
cir.func @invalid_copy(%arg0 : !cir.ptr<!cir.void>, %arg1 : !cir.ptr<!cir.void>) {
// expected-error@+1 {{missing data layout for pointee type}}
cir.copy %arg0 to %arg1 : !cir.ptr<!cir.void>
cir.return
}
}
// -----
module {
// skip_tail_padding is only valid for record pointee types.
cir.func @invalid_skip_tail_padding(%arg0 : !cir.ptr<!cir.int<s, 32>>, %arg1 : !cir.ptr<!cir.int<s, 32>>) {
// expected-error@+1 {{skip_tail_padding is only valid for record pointee types}}
cir.copy %arg0 to %arg1 skip_tail_padding : !cir.ptr<!cir.int<s, 32>>
cir.return
}
}