Skip to content

Conversation

@dsyme
Copy link
Contributor

@dsyme dsyme commented Aug 23, 2021

PR #11957 caused a regression in debug code generation in an obscure case used by the debug-mode compiler

For a loop

let unsolved = [true]
let f() = 

        for priority = 0 to 10 do
            unsolved |> List.iter (fun tp -> System.Console.WriteLine())

The pipeline was being incorrectly marked as "has no effect". Normally effect information doesn't matter in debug code generation, however in one case (for loops) the construct was being omitted altogether if the body was judged to have no effect.

This meant the debug-mode compiler we build in our tree was malfunctioning. This fixes this problem.

@brettfo We should probably run at least one of our test suites in debug mode.

@dsyme
Copy link
Contributor Author

dsyme commented Aug 24, 2021

This is ready @KevinRansom @TIHan @vzarytovskii

@TIHan TIHan merged commit a31c18e into dotnet:main Aug 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants