Skip to content

koch fails to boot nim with VCC compile backend #6229

Open
@fredrikhr

Description

When booting the nim compiler with the koch utility, by using koch boot -d:release to produces a release build, it critically fails in the 2nd iteration.

msgs.nim(602, 32) Error: ambiguous call; both tables.[](t: var Table[[].A, [].B], key: A)[declared in lib\pure\collections\tables.nim(167, 5)] and tables.[](t: Table[[].A, [].B], key: A)[declared in lib\pure\collections\tables.nim(161, 5)] match for: (Table[system.string, system.int32], string)

According to @Araq, this is a regression caused by MSVC that miscompiles nim in the first iteration.

@Araq also stated on IRC that the issue is caused in compiler/semcall.nim (line 70) where MSVC appearently prematurely collects an important data structure in an attempt to optimize away the stack root.

This error does not occur when running koch boot which produces a non-optimized version of the compiler.

This currently makes it impossible to produce a release build of Nim with the VCC compiler backend.

Activity

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

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions