1// RUN: %clang_cc1 -fsyntax-only -verify %s 2struct {unsigned x : 2;} x; 3__typeof__((x.x+=1)+1) y; 4__typeof__(x.x<<1) y; 5int y; 6 7 8struct { int x : 8; } x1; 9long long y1; 10__typeof__(((long long)x1.x + 1)) y1; 11 12 13// Check for extensions: variously sized unsigned bit-fields fitting 14// into a signed int promote to signed int. 15enum E { ec1, ec2, ec3 }; 16struct S { 17 enum E e : 2; 18 unsigned short us : 4; 19 unsigned long long ul1 : 8; 20 unsigned long long ul2 : 50; 21} s; 22 23__typeof(s.e + s.e) x_e; 24int x_e; 25 26__typeof(s.us + s.us) x_us; 27int x_us; 28 29__typeof(s.ul1 + s.ul1) x_ul1; 30int x_ul1; 31 32__typeof(s.ul2 + s.ul2) x_ul2; 33unsigned long long x_ul2; 34 35