Skip to content

Assertion failed 'markedLastLoop && markedCurrLoop' during 'Generate code'  #65988

Closed

Description

@kunalspathak
// Found by Antigen
using System;
using System.Collections.Generic;
using System.Runtime.CompilerServices;
public class TestClass
{
    public struct S1
    {
        public decimal decimal_0;
    }
    public struct S2
    {
        public S1 s1_2;
    }
    static bool s_bool_3 = false;
    static int s_int_9 = 1;
    bool bool_19 = true;
    decimal decimal_22 = 0.0851063829787234042553191489m;
    S1 s1_33 = new S1();
    public decimal LeafMethod3()
    {
        unchecked
        {
            return 15-4-4% decimal_22+ 67;
        }
    }
    public int LeafMethod6()
    {
        unchecked
        {
            return 15<<4;
        }
    }
    public void Method0()
    {
        unchecked
        {
            bool bool_79 = true;
            int int_85 = 76;
            S1 s1_93 = new S1();
            S2 s2_94 = new S2();
            for (;;)
            {
                if (bool_79)
                {
                    if (s_bool_3)
                    {
                    }
                    else
                    {
                        if (bool_19 = 15==4)
                        {
                        }
                        else
                        {
                            if (LeafMethod6() < (s_int_9 *= int_85))
                            {
                                s1_33.decimal_0 += decimal_22 -= 15*4- -2147483646.9375m;
                            }
                            else
                            {
                            }
                        }
                    }
                }
                else
                {
                }
                s1_93.decimal_0 /= (s1_33.decimal_0 /= LeafMethod3() * (s2_94.s1_2.decimal_0 += 15+4)+ 25)+ 28;
            }
            return;
        }
    }
    public static void Main(string[] args)
    {
        new TestClass().Method0();
    }
}
/*
Environment:

set COMPlus_TC_OnStackReplacement=1
set COMPlus_TC_QuickJitForLoops=1
set COMPlus_TC_OnStackReplacement_InitialCounter=1
set COMPlus_OSR_HitLimit=1
set COMPlus_EnableSSE2=0

Assert failure(PID 114444 [0x0001bf0c], Thread: 10776 [0x2a18]): Assertion failed 'markedLastLoop && markedCurrLoop' in 'DecCalc:DecAddSub(byref,byref,bool)' during 'Generate code' (IL size 1289)
    File: D:\git\dotnet-runtime\src\coreclr\jit\emit.cpp Line: 5284
    Image: d:\git\dotnet-runtime\artifacts\tests\coreclr\windows.x64.Checked\tests\Core_Root\CoreRun.exe
*/

Activity

  1. ghost added
    untriagedNew issue has not been triaged by the area owner
    on Mar 1, 2022
  2. self-assigned this
    on Mar 1, 2022
  3. kunalspathak commented on Mar 1, 2022

    @kunalspathak
    ContributorAuthor

    @dotnet/jit-contrib

  4. removed
    untriagedNew issue has not been triaged by the area owner
    on Mar 3, 2022
  5. added this to the 7.0.0 milestone on Mar 3, 2022
  6. kunalspathak commented on May 11, 2022

    @kunalspathak
    ContributorAuthor

    Closed by #68869

  7. ghost locked as resolved and limited conversation to collaborators on Jun 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

arch-x64area-CodeGen-coreclrCLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMIos-windows

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions