@Test
public void misc1() throws Exception {

  final String original =
      "void f()\n"
          + "{"
          + "  int GLF_merged1_1_1_1c;\n"
          + "  int GLF_merged1_0_1_1b;\n"
          + "  {\n"
          + "      vec2 GLF_merged2_0_1_1_1_1_1bc;\n"
          + "      GLF_merged2_0_1_1_1_1_1bc.x;\n"
          + "      GLF_merged2_0_1_1_1_1_1bc.y;\n"
          + "      GLF_merged1_1_1_1c = 2;\n"
          + "  }\n"
          + "}\n";
  final String expected1 =
      "void f()\n"
          + "{"
          + "  int GLF_merged1_1_1_1c;\n"
          + "  int GLF_merged1_0_1_1b;\n"
          + "  {\n"
          + "      float b;\n"
          + "      vec2 GLF_merged2_0_1_1_1_1_1bc;\n"
          + "      b;\n"
          + "      GLF_merged2_0_1_1_1_1_1bc.y;\n"
          + "      GLF_merged1_1_1_1c = 2;\n"
          + "  }\n"
          + "}\n";
  final String expected2 =
      "void f()\n"
          + "{"
          + "  int GLF_merged1_1_1_1c;\n"
          + "  int GLF_merged1_0_1_1b;\n"
          + "  {\n"
          + "      float c;\n"
          + "      float b;\n"
          + "      vec2 GLF_merged2_0_1_1_1_1_1bc;\n"
          + "      b;\n"
          + "      c;\n"
          + "      GLF_merged1_1_1_1c = 2;\n"
          + "  }\n"
          + "}\n";
  final TranslationUnit tu = ParseHelper.parse(original);
  List<VectorizationReductionOpportunity> ops = VectorizationReductionOpportunities
          .findOpportunities(MakeShaderJobFromFragmentShader.make(tu),
              new ReducerContext(false, ShadingLanguageVersion.GLSL_440,
      new ZeroCannedRandom(), new IdGenerator()));
  assertEquals(2, ops.size());
  ops =
      ops.stream().filter(item -> item.getComponentType() == BasicType.FLOAT)
          .collect(Collectors.toList());
  assertEquals(2, ops.size());
  ops.stream().filter(item -> item.getComponentName().equals("b")).findAny().get()
      .applyReduction();
  assertEquals(PrettyPrinterVisitor.prettyPrintAsString(ParseHelper.parse(expected1)),
      PrettyPrinterVisitor.prettyPrintAsString(tu));
  ops.stream().filter(item -> item.getComponentName().equals("c")).findAny().get()
      .applyReduction();
  assertEquals(PrettyPrinterVisitor.prettyPrintAsString(ParseHelper.parse(expected2)),
      PrettyPrinterVisitor.prettyPrintAsString(tu));
}