clang/test/CIR/IR/invalid-tls.cir
raw| 1 | // RUN: cir-opt %s -verify-diagnostics -split-input-file |
| 2 | |
| 3 | !s32i = !cir.int<s, 32> |
| 4 | |
| 5 | module { |
| 6 | cir.global "private" external @non_tls : !s32i |
| 7 | cir.func @error() { |
| 8 | // expected-error@+1 {{access to global not marked thread local}} |
| 9 | %0 = cir.get_global thread_local @non_tls : !cir.ptr<!s32i> |
| 10 | cir.return |
| 11 | } |
| 12 | } |
| 13 |