1cb93a386Sopenharmony_ciuniform half4 colorRed, colorGreen;
2cb93a386Sopenharmony_ci
3cb93a386Sopenharmony_cibool test() {
4cb93a386Sopenharmony_ci    bool ok = true;
5cb93a386Sopenharmony_ci    int x = 12 | 6;
6cb93a386Sopenharmony_ci    ok = ok && (x == 14);
7cb93a386Sopenharmony_ci    x = 254 & 7;
8cb93a386Sopenharmony_ci    ok = ok && (x == 6);
9cb93a386Sopenharmony_ci    x = 2 ^ 7;
10cb93a386Sopenharmony_ci    ok = ok && (x == 5);
11cb93a386Sopenharmony_ci    x = 1 << 4;
12cb93a386Sopenharmony_ci    ok = ok && (x == 16);
13cb93a386Sopenharmony_ci    // Left-shifting a negative integer is undefined in C++, but allowed in GPU shading languages.
14cb93a386Sopenharmony_ci    // https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=29093
15cb93a386Sopenharmony_ci    x = -2 << 2;
16cb93a386Sopenharmony_ci    ok = ok && (x == -8);
17cb93a386Sopenharmony_ci    x = 128 >> 2;
18cb93a386Sopenharmony_ci    ok = ok && (x == 32);
19cb93a386Sopenharmony_ci    x = 123 % 45;
20cb93a386Sopenharmony_ci    ok = ok && (x == 33);
21cb93a386Sopenharmony_ci    return ok;
22cb93a386Sopenharmony_ci}
23cb93a386Sopenharmony_ci
24cb93a386Sopenharmony_cihalf4 main(float2 coords) {
25cb93a386Sopenharmony_ci    return test() ? colorGreen : colorRed;
26cb93a386Sopenharmony_ci}
27