| // RUN: cir-opt %s -verify-diagnostics -split-input-file |
| |
| !s32i = !cir.int<s, 32> |
| !s64i = !cir.int<s, 64> |
| |
| module { |
| |
| // expected-error @below {{type of the real part does not match the complex type}} |
| cir.global external @ci2 = #cir.const_complex<#cir.int<1> : !s64i, #cir.int<2> : !s32i> : !cir.complex<!s32i> |
| |
| } |
| |
| // ----- |
| |
| !s32i = !cir.int<s, 32> |
| !s64i = !cir.int<s, 64> |
| |
| module { |
| |
| // expected-error @below {{type of the imaginary part does not match the complex type}} |
| cir.global external @ci2 = #cir.const_complex<#cir.int<1> : !s32i, #cir.int<2> : !s64i> : !cir.complex<!s32i> |
| |
| } |