1*f4a2713aSLionel Sambuc // RUN: %clang_cc1 -fsyntax-only -verify %s 2*f4a2713aSLionel Sambuc struct foo { 3*f4a2713aSLionel Sambuc int a; 4*f4a2713aSLionel Sambuc }; 5*f4a2713aSLionel Sambuc main()6*f4a2713aSLionel Sambucint main() { 7*f4a2713aSLionel Sambuc struct foo xxx; 8*f4a2713aSLionel Sambuc int i; 9*f4a2713aSLionel Sambuc 10*f4a2713aSLionel Sambuc xxx = (struct foo)1; // expected-error {{used type 'struct foo' where arithmetic or pointer type is required}} 11*f4a2713aSLionel Sambuc i = (int)xxx; // expected-error {{operand of type 'struct foo' where arithmetic or pointer type is required}} 12*f4a2713aSLionel Sambuc } 13