Skip to content

Extra calls in Asm #109688

Open
Open
@1zaboy

Description

@1zaboy

Description

I have method

    public static void RecordError(Exception exception)
    {
    }

And I have code witch call RecordError

                try
                {
                     ...
                }
                catch (Exception ex)
                {
                    O.RecordError(ex);
                }

But when I build it and check Asm, I see call [Test.O:RecordError(System.Exception)] in asm

Since the method does not contain any code, its call could be removed.

I use .net 8 and Disasmo for see asm

Reproduction Steps

See Description

Expected behavior

not call method

Actual behavior

call method

Regression?

No response

Known Workarounds

Configuration

.net 8

<PropertyGroup>
    <OutputType>Exe</OutputType>
    <TargetFramework>net8.0</TargetFramework>
    <ImplicitUsings>enable</ImplicitUsings>
    <Nullable>enable</Nullable>
</PropertyGroup>

Other information

No response

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-CodeGen-coreclrCLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMIhelp wanted[up-for-grabs] Good issue for external contributors

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions