Files
521416d2b9 Keep the file name in RTL dump insn locations (#9121)
Spun out of #9118, where the reporter noted that turning Line Numbers
off "leaves behind other artifacts in the dump".

When Line Numbers is off we strip the `[file:line]` prefixes that the
forced `-lineno` adds (#8826, #8931). The RTL branch also deleted the
quoted file name from each insn's own `"file":line:col`. GCC prints that
location with or without `-lineno`, so it was never lineno noise.
Removing only the name left a bare `:113:20` on every insn, which reads
as a line of the user's six-line source even when it points into
`vector.tcc`. The `expand` pass of the #9118 repro link has 62 such
lines on the live site.

This stops stripping it. Since the restored path would otherwise be the
scratch directory in a dev setup, the temp dir is masked to `/app/` as
it is for other compiler output. On prod the path is already
`/app/example.cpp`, so nothing else changes.

Checked against real GCC output: comparing every pass of a compile of
the #9118 source with a genuine no-`-lineno` run, the stripped output is
now byte-identical on all 198 passes, where before 71 (all RTL)
differed. The one existing test that pinned the old behaviour is
flipped, and a test for the masking is added. Both fail without the fix.

This is one of several small fixes around #9118; the option the reporter
asked for is a separate, larger change.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: mattgodbolt-molty <mattgodbolt-molty@users.noreply.github.com>
Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
2026-09-14 08:16:48 -06:00
..
2026-07-02 18:26:35 +01:00
2025-07-28 10:34:46 -05:00