Project does not compile with Swift 6 on Windows (but on macOS)

I have an SPM project that cannot be compiled on Windows with Swift 6.0.0 or 6.0.1, but it can be compiled with Swift 5.10.1 on Windows and with 6.0.0 on macOS.

The error is

[85/87] Compiling RegexTemplatesWithEntities RegexTemplatesWithEntities.swift
error: compile command failed due to exception 3 (use -v to see invocation)

but the file RegexTemplatesWithEntities.swift is part of a package which can be compiled separately with Swift 6.0.1 on Windows.

Furthermore, in the next output line it says:

error: failed parsing the Swift compiler output: unexpected JSON message: {

Part of the non-parsable JSON is the following:

Assertion failed: !i->getOperand()->getType().isMoveOnly(), file C:\\Users\\swift-ci\\jenkins\\workspace\\swift-6.0.0-windows-toolchain\\swift\\lib\\IRGen\\IRGenSIL.cpp, line 5035\r\nPlease submit a bug report (https:\/\/swift.org\/contributing\/#reporting-bugs) and include the crash backtrace.\r\nStack dump:...

So what is the crash backtrace? Is it what follows after "Stack dump"? What is supposed to be part of the bug report, or has someone already an idea what the cause could be?

I've run into a handful of compiler assertion issues on Windows when moving from 5.10.x to 6.x. Since the Swift distributions for Windows are compiled with assertions enabled, we get to see the compiler errors that others don't usually see :slight_smile:.

Sometimes adding the --use-integrated-swift-driver flag to swift build can provide better diagnostic messaging...