Landing: 9d868e49122b
Project / Subsystem
gcc / gcc/fortran
Date
2026-06-09
Author
Thomas Koenig
Commit
9d868e49122b4ce45cffa4d3f47f6ef371e80a24
Source
github
Perf win
No
Breaking
No
All attributes
- project
- gcc
- subsystem
- gcc/fortran
- patch_id
- —
- commit_hash
- 9d868e49122b4ce45cffa4d3f47f6ef371e80a24
- source_type
- github
- headline
- GCC implements new Fortran warnings for unused and undefined variables.
- tldr
- GCC now provides new warnings for Fortran code concerning undefined variables and variables set but never used, improving code quality and catching potential e…
- author
- Thomas Koenig
- outcome
- committed
- performance_win
- false
- breaking_change
- false
- series_id
- —
- series_parts
- []
- tags
-
- • fortran
- • warnings
- • static-analysis
- • code-quality
- discussion_id_link
- github:gcc-mirror/gcc#30438
- bugzilla_pr
- —
- date
- 2026-06-09T00:00:00.000Z
This commit introduces new -Wundefined-vars and -Wunused-but-set-variable warnings for Fortran, addressing issues where variables are used without prior definition or set to a value that is never subsequently read. The implementation tracks variable usage and definition within a namespace, carefully avoiding false positives by excluding certain conditions. This significantly enhances compiler diagnostics for Fortran developers, helping them identify and correct potential logical flaws and dead code, ultimately leading to more robust and maintainable programs.