blob: 294662c5f42ee39940c5a1e0520e5d380d893555 [file] [log] [blame]
// Copyright (c) 2019, the R8 project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
package com.android.tools.r8.debuginfo;
import java.util.Arrays;
import java.util.Iterator;
// Copy of Regress111337896Test.java modified to hit the trivial loop issue.
public class Regress129901036Test {
public static void regress129901036() {
Iterator it = Arrays.asList(new Object()).iterator();
while (it.hasNext()) { // Loop must be a conditional to hit the issue.
it.next();
try {
noThrow();
noThrow();
noThrow();
// Workaround failed to handle a trivial loop when searching for a possible loop header.
} catch (Exception e) { while (true); }
// The normal successor may differ from the exceptional one and still cause the issue.
it.hasNext();
}
}
public static void noThrow() throws Exception {
// Intentionally empty.
}
public static void main(String[] args) {
regress129901036();
System.out.print("aok");
}
}