dart-sdk/tests/language/vm/regress_45855_test.dart
Daco Harkes cb636850df [vm] Exclude current_context_var from ValidatePhis
current_context_var is special cased in the liveness analysis and never
pruned even though it does not have uses by instructions. The lack of
pruning caused the assert to fire. This CL adds the special casing to
this assert as well.

Closes: https://github.com/dart-lang/sdk/issues/45855

TEST=tests/language/vm/regress_45855_test.dart

Change-Id: Ica74a43bd2449dd994639c686253449146216458
Fixed: 45855
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/197541
Commit-Queue: Daco Harkes <dacoharkes@google.com>
Reviewed-by: Alexander Markov <alexmarkov@google.com>
2021-05-01 09:28:17 +00:00

35 lines
859 B
Dart

// Copyright (c) 2021, the Dart 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.
//
// VMOptions=--optimization-counter-threshold=100 --deterministic
//
// The Dart Project Fuzz Tester (1.89).
// Program generated as:
// dart dartfuzz.dart --seed 928581289 --no-fp --ffi --no-flat
//
// Minimized.
@pragma('vm:never-inline')
void main2(bool? boolParam) {
for (int i = 0; i < 200; i++) {
final bool1 = boolParam ?? false;
if (bool1) {
() {
// Force creating a new current context.
i.toString();
};
// Force having multiple paths to the exit, popping the current context.
break;
}
}
}
void main() {
// Test OSR.
main2(null);
// Test non-OSR.
main2(null);
}