aboutsummaryrefslogtreecommitdiff
path: root/tests/spec/glsl-es-1.00/compiler/arithmetic-operators/division-by-zero-02.frag
diff options
context:
space:
mode:
Diffstat (limited to 'tests/spec/glsl-es-1.00/compiler/arithmetic-operators/division-by-zero-02.frag')
-rw-r--r--tests/spec/glsl-es-1.00/compiler/arithmetic-operators/division-by-zero-02.frag18
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/spec/glsl-es-1.00/compiler/arithmetic-operators/division-by-zero-02.frag b/tests/spec/glsl-es-1.00/compiler/arithmetic-operators/division-by-zero-02.frag
new file mode 100644
index 00000000..7b1e906c
--- /dev/null
+++ b/tests/spec/glsl-es-1.00/compiler/arithmetic-operators/division-by-zero-02.frag
@@ -0,0 +1,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;
+}