brintos

brintos / llvm-project-archived public Read only

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