1f08c3bdfSopenharmony_cistatic int and_bool(int x, int y) 2f08c3bdfSopenharmony_ci{ 3f08c3bdfSopenharmony_ci return x && y; 4f08c3bdfSopenharmony_ci} 5f08c3bdfSopenharmony_ci 6f08c3bdfSopenharmony_cistatic unsigned int uand_bool(unsigned int x, unsigned int y) 7f08c3bdfSopenharmony_ci{ 8f08c3bdfSopenharmony_ci return x && y; 9f08c3bdfSopenharmony_ci} 10f08c3bdfSopenharmony_ci 11f08c3bdfSopenharmony_cistatic int or_bool(int x, int y) 12f08c3bdfSopenharmony_ci{ 13f08c3bdfSopenharmony_ci return x || y; 14f08c3bdfSopenharmony_ci} 15f08c3bdfSopenharmony_ci 16f08c3bdfSopenharmony_cistatic unsigned int uor_bool(unsigned int x, unsigned int y) 17f08c3bdfSopenharmony_ci{ 18f08c3bdfSopenharmony_ci return x || y; 19f08c3bdfSopenharmony_ci} 20f08c3bdfSopenharmony_ci 21f08c3bdfSopenharmony_ci/* 22f08c3bdfSopenharmony_ci * check-name: Logical operator code generation 23f08c3bdfSopenharmony_ci * check-command: sparsec -c $file -o tmp.o 24f08c3bdfSopenharmony_ci */ 25