aboutsummaryrefslogtreecommitdiff
path: root/tests/spec/glsl-es-1.00/compiler/arithmetic-operators/division-by-zero-02.frag
blob: 7b1e906cdda34b44e739307cb8973335b2bdf6b7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// [config]
// expect_result: pass
// glsl_version: 1.10
// glsles_version: 1.00
// [end config]

//
// # Division by zero is legal for integer values.
// #
// # From section 5.9 of the GLSL ES 1.00.17 spec:
// #    Dividing by zero does not cause an exception but does result in an
// #    unspecified value.

int
f() {
    int x = 1 / 0;
    return x;
}