bug4587739.js 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. //-------------------------------------------------------------------------------------------------------
  2. // Copyright (C) Microsoft. All rights reserved.
  3. // Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
  4. //-------------------------------------------------------------------------------------------------------
  5. //Arch: X86
  6. //Flavor: chk
  7. //reduced switches: -mic:1 -off:simplejit -off:memop
  8. //noRepro switches1: -mic:1 -off:simplejit -off:memop -off:InterpreterProfile
  9. //noRepro switches2: -mic:1 -off:simplejit -off:memop -off:DynamicProfile
  10. //noRepro switches3: -mic:1 -off:simplejit -off:memop -off:EliminateArrayAccessHelperCall
  11. //noRepro switches4: -mic:1 -off:simplejit -off:memop -off:JsArraySegmentHoist
  12. //noRepro switches5: -mic:1 -off:simplejit -off:memop -off:ArraySegmentHoist
  13. //noRepro switches6: -mic:1 -off:simplejit -off:memop -off:ArrayCheckHoist
  14. //noRepro switches7: -mic:1 -off:simplejit -off:memop -off:AggressiveIntTypeSpec
  15. //noRepro switches8: -mic:1 -off:simplejit -off:memop -off:TypeSpec
  16. //noRepro switches9: -mic:1 -off:simplejit -off:memop -off:BoundCheckHoist
  17. //noRepro switches10: -mic:1 -off:simplejit -off:memop -off:BoundCheckElimination
  18. //noRepro switches11: -mic:1 -off:simplejit -off:memop -off:TrackRelativeIntBounds
  19. //noRepro switches12: -mic:1 -off:simplejit -off:memop -off:PathDependentValues
  20. var int = true;
  21. function test() {
  22. var start = int ? 1 : -5;
  23. var end = start + 8;
  24. for (var i = start; i < end; i++) {
  25. a[i] = 3;
  26. }
  27. int = false;
  28. }
  29. var a = Array(10);
  30. a.fill();
  31. test();
  32. test();
  33. a[0];
  34. print("PASSED");
  35. // === Output ===
  36. // command: ch.exe -mic:1 -off:simplejit -off:memop bug4587739.js
  37. // exitcode: C0000420
  38. // stdout:
  39. //
  40. // stderr:
  41. // ASSERTION 14340: (lib\runtime\language\profilinghelpers.cpp, line 136) head->left == 0
  42. // Failure: (head->left == 0)
  43. // FATAL ERROR: ch.exe failed due to exception code c0000420