blob: 90d1e3dc121539724311d3dfeb492bceffd8e8fb [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;
10
11result = arr*ii;
12result = ii*brr;
Steve Naroffa7f7b802008-01-14 21:38:57 +000013
14result = arr*brr;
Steve Naroff73458bf2008-01-14 23:33:18 +000015result = xx*yy;
Steve Naroff36e35e62008-01-15 01:41:59 +000016
17switch (arr) { // expected-error{{statement requires expression of integer type ('_Complex int' invalid)}}
18 case brr: ; // expected-error{{case label does not reduce to an integer constant}}
19 case xx: ; // expected-error{{case label does not reduce to an integer constant}}
20}
Steve Naroffa7f7b802008-01-14 21:38:57 +000021}
22