Landing: 5f2c4cacfcdf

Project / Subsystem

gcc / fortran

Date

2026-07-04

Author

Sandra Loosemore

Commit

5f2c4cacfcdf9f6ed77ded6467df31cc90181e07

Source

github

Perf win

No

Breaking

No

All attributes

project
gcc
subsystem
fortran
patch_id
commit_hash
5f2c4cacfcdf9f6ed77ded6467df31cc90181e07
source_type
github
headline
Fortran: Fix ICE-on-invalid in trans_code.
tldr
Prevents an internal compiler error in the Fortran front-end when handling invalid expressions.
author
Sandra Loosemore
outcome
committed
performance_win
false
breaking_change
false
series_id
series_parts
[]
tags
  • fortran
  • ice
  • bugfix
discussion_id_link
bugzilla_pr
date
2026-07-04T00:00:00.000Z

This commit addresses an internal compiler error (ICE) that occurred in the Fortran front-end’s trans_code function. The error happened when the compiler attempted to set the source code location for invalid tree expressions, such as error_mark_node. By adding a check to ensure that location information is only set for valid expression nodes, this commit prevents the ICE and improves the compiler’s robustness when encountering errors during code translation.