brintos

brintos / llvm-project-archived public Read only

0
0
Text · 584 B · 4519485 Raw
22 lines · plain
1// RUN: cir-opt %s -verify-diagnostics -split-input-file2 3!void = !cir.void4 5// expected-error@+1 {{expects an existing label target in the referenced function}}6cir.func @bad_block_address() -> () {7    %0 = cir.block_address <@bad_block_address, "label"> : !cir.ptr<!void>8    cir.br ^bb19  ^bb1:10    cir.label "wrong_label"11    cir.return12}13 14// expected-error@+1 {{blockaddress references a different function}}15cir.func @bad_block_func() -> () {16    %0 = cir.block_address <@mismatch_func, "label"> : !cir.ptr<!void>17    cir.br ^bb118  ^bb1:19    cir.label "label"20    cir.return21}22