Skip to content

nvidia: work around GCC 16.1.x ICE compiling flcn_ls10.c#1235

Open
vs4848 wants to merge 3 commits into
NVIDIA:mainfrom
vs4848:fix-gcc16-ice-flcn-ls10
Open

nvidia: work around GCC 16.1.x ICE compiling flcn_ls10.c#1235
vs4848 wants to merge 3 commits into
NVIDIA:mainfrom
vs4848:fix-gcc16-ice-flcn-ls10

Conversation

@vs4848

@vs4848 vs4848 commented Jul 9, 2026

Copy link
Copy Markdown

Fixes #1213

GCC 16.1.x's instruction scheduler (sched2 RTL pass) segfaults with an internal compiler error while compiling _flcnDmemTransfer_LS10() in common/nvswitch/kernel/ls10/flcn_ls10.c at the default optimization level. This is a GCC codegen bug specific to this function's shape, not a defect in the source.

This disables the two GCC instruction-scheduling passes (-fno-schedule-insns2 -fno-schedule-insns) for this single translation unit only, gated to GCC >= 16.0.0 via the existing nv-compiler.sh version check. This unblocks builds on GCC 16 toolchains without disabling scheduling anywhere else in nv-kernel.o, and is a no-op on all other compilers/versions.

Credit to @axiom0x0 for the original diagnosis and for manually verifying this workaround in #1213.

Verification: Built common/nvswitch/kernel/ls10/flcn_ls10.c with GCC 16 on Ubuntu 24.04 (via CI) — compiles cleanly with no ICE, build proceeds normally to subsequent files.

@CLAassistant

CLAassistant commented Jul 9, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

vs4848 added 3 commits July 9, 2026 17:02
GCC 16.1.x's instruction scheduler (sched2 RTL pass) segfaults with
an internal compiler error while compiling _flcnDmemTransfer_LS10()
in common/nvswitch/kernel/ls10/flcn_ls10.c at the default optimization
level. This is a GCC codegen bug specific to this function's shape,
not a defect in the source.

Disable the two GCC instruction-scheduling passes
(-fno-schedule-insns[2]) for this single translation unit only, gated
to GCC >= 16.0.0 via the existing nv-compiler.sh version check. This
unblocks builds on GCC 16 toolchains without disabling scheduling
anywhere else in nv-kernel.o, and is a no-op on all other compilers/
versions.

Fixes NVIDIA#1213
@vs4848 vs4848 force-pushed the fix-gcc16-ice-flcn-ls10 branch from d8f9c26 to 32dddd1 Compare July 10, 2026 00:02
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.

Build fails on flcn_ls10.c: GCC 16.1.1 ICE in sched2 RTL pass (open 610.43.02, Linux 7.0.12)

2 participants