blob: 1e2f8cf4ed237be9a5336f622cb5febf6cdde630 [file] [log] [blame]
Steve Naroffa7f7b802008-01-14 21:38:57 +00001// RUN: clang %s -verify -fsyntax-only
2
3void a() {
4__complex__ int arr;
5__complex__ short brr;
Steve Naroff73458bf2008-01-14 23:33:18 +00006__complex__ unsigned xx;
7__complex__ signed yy;
Steve Naroffa7f7b802008-01-14 21:38:57 +00008__complex__ int result;
Steve Naroff36e35e62008-01-15 01:41:59 +00009int ii;
Steve Naroff43001212008-01-15 19:36:10 +000010int aa = 1 + 1.0iF;
Steve Naroff36e35e62008-01-15 01:41:59 +000011
12result = arr*ii;
13result = ii*brr;
Steve Naroffa7f7b802008-01-14 21:38:57 +000014
15result = arr*brr;
Steve Naroff73458bf2008-01-14 23:33:18 +000016result = xx*yy;
Steve Naroff36e35e62008-01-15 01:41:59 +000017
18switch (arr) { // expected-error{{statement requires expression of integer type ('_Complex int' invalid)}}
19 case brr: ; // expected-error{{case label does not reduce to an integer constant}}
20 case xx: ; // expected-error{{case label does not reduce to an integer constant}}
21}
Steve Naroffa7f7b802008-01-14 21:38:57 +000022}
23