1 // RUN: %clang_cc1 -fsyntax-only -verify %s -std=c99 -triple aarch64 -target-feature +bf16 -target-feature +sve 2 3 typedef struct N {} N; 4 5 typedef int B1; 6 typedef B1 X1; 7 typedef B1 Y1; 8 9 typedef void B2; 10 typedef B2 X2; 11 typedef B2 Y2; 12 13 typedef struct B3 {} B3; 14 typedef B3 X3; 15 typedef B3 Y3; 16 17 typedef struct B4 {} *B4; 18 typedef B4 X4; 19 typedef B4 Y4; 20 21 typedef __bf16 B5; 22 typedef B5 X5; 23 typedef B5 Y5; 24 25 typedef __SVInt8_t B6; 26 typedef B6 X6; 27 typedef B6 Y6; 28 29 N t1 = 0 ? (X1)0 : (Y1)0; // expected-error {{incompatible type 'B1'}} 30 N t2 = 0 ? (X2)0 : 0; // expected-error {{incompatible type 'X2'}} 31 N t3 = 0 ? 0 : (Y2)0; // expected-error {{incompatible type 'Y2'}} 32 N t4 = 0 ? (X2)0 : (Y2)0; // expected-error {{incompatible type 'B2'}} 33 N t5 = 0 ? (X3){} : (Y3){}; // expected-error {{incompatible type 'B3'}} 34 N t6 = 0 ? (X4)0 : (Y4)0; // expected-error {{incompatible type 'B4'}} 35 36 X5 x5; 37 Y5 y5; 38 N t7 = 0 ? x5 : y5; // expected-error {{incompatible type 'B5'}} 39 f8()40void f8() { 41 X6 x6; 42 Y6 y6; 43 N t8 = 0 ? x6 : y6; // expected-error {{incompatible type 'B6'}} 44 } 45