@Test
public void testDoNotRemoveReturnThatWouldChangeSemantics() throws Exception {

  final String program = "layout(location = 0) out vec4 color;\n"
      + "void main() {\n"
      + "  return;\n"
      + "  color = vec4(1.0);\n"
      + "}\n";
  final TranslationUnit tu = ParseHelper.parse(program);
  final List<StmtReductionOpportunity> ops = StmtReductionOpportunities.findOpportunities(
      MakeShaderJobFromFragmentShader.make(tu),
      new ReducerContext(false, ShadingLanguageVersion.ESSL_300, new RandomWrapper(0),
          new IdGenerator()));
  // We cannot remove the return, as this would make the write to 'color' reachable.
  // We could in principle remove the color write itself, since it is unreachable.  Right now we
  // do not, so this test would have to be re-thought if we decided to add that facility.
  assertEquals(0, ops.size());
}