1 typedef unsigned short __attribute__((bitwise))__le16;
   2 static __le16 foo(__le16 a)
   3 {
   4         return a |= ~a;
   5 }
   6 
   7 static int baz(__le16 a)
   8 {
   9         return ~a == ~a;
  10 }
  11 
  12 static int barf(__le16 a)
  13 {
  14         return a == (a & ~a);
  15 }
  16 
  17 static __le16 bar(__le16 a)
  18 {
  19         return -a;
  20 }
  21 
  22 /*
  23  * check-name: foul bitwise
  24  * check-error-start
  25 foul-bitwise.c:9:16: warning: restricted __le16 degrades to integer
  26 foul-bitwise.c:9:22: warning: restricted __le16 degrades to integer
  27 foul-bitwise.c:19:16: warning: restricted __le16 degrades to integer
  28 foul-bitwise.c:19:16: warning: incorrect type in return expression (different base types)
  29 foul-bitwise.c:19:16:    expected restricted __le16
  30 foul-bitwise.c:19:16:    got int
  31  * check-error-end
  32  */