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