Landing: da2385e53a08

Project / Subsystem

gcc / gcc/cobol

Date

2026-07-05

Author

James K. Lowden

Commit

da2385e53a08b59db6769eef93199a7fdd0ee00f

Source

github

Perf win

No

Breaking

No

All attributes

project
gcc
subsystem
gcc/cobol
patch_id
commit_hash
da2385e53a08b59db6769eef93199a7fdd0ee00f
source_type
github
headline
COBOL diagnostics now report correct 'included from' location
tldr
COBOL compiler errors now point to the correct line in `COPY` directives when issues arise in included files.
author
James K. Lowden
outcome
committed
performance_win
false
breaking_change
false
series_id
series_parts
[]
tags
  • cobol
  • compiler
  • diagnostics
discussion_id_link
bugzilla_pr
date
2026-07-05T00:00:00.000Z

When an error occurred within a COBOL copybook (an included file), the GCC compiler incorrectly reported the error location. This commit refactors the error reporting mechanism to correctly identify and report the line number of the COPY directive itself, rather than a location within the included file. Additionally, it corrects an issue where paragraph and section relationships were misrecorded, affecting PERFORM statements in specific scenarios.