Reproduces the issues reported by b/
125183107.
Bug: b/
125183107
Change-Id: If0f2ab3fcc8c065409fdbbc6df670f78a78fa3f7
Reviewed-on: https://swiftshader-review.googlesource.com/c/25169
Tested-by: Ben Clayton <bclayton@google.com>
Kokoro-Presubmit: kokoro <noreply+kokoro@google.com>
Reviewed-by: Nicolas Capens <nicolascapens@google.com>
);
}
+// Test that the compiler correctly handles functions being stripped.
+// The frontend will strip the Dead functions, but may keep the their function
+// labels reserved. This produces labels that are greater than the number of
+// live functions.
+TEST_F(SwiftShaderTest, CompilerLimits_SparseLabels)
+{
+ checkCompiles(
+ "void Dead1() {}\n"
+ "void Dead2() {}\n"
+ "void Dead3() {}\n"
+ "void Dead4() {}\n"
+ "void Dead5() { Dead1(); Dead2(); Dead3(); Dead4(); }\n"
+ "float F(float f) { for(int i = 0; i < -1; ++i) { Dead5(); } return f; }\n"
+ );
+}
+
#ifndef EGL_ANGLE_iosurface_client_buffer
#define EGL_ANGLE_iosurface_client_buffer 1
#define EGL_IOSURFACE_ANGLE 0x3454