This is an archive of the discontinued LLVM Phabricator instance.

[flang] Fix defined I/O semantics crash & missing errors that exposed it
ClosedPublic

Authored by klausler on Jan 27 2023, 9:55 AM.

Details

Summary

Semantics crashes when emitting runtime derived type information tables
for a type that has user-defined I/O procedures declared outside the
type with explicit INTERFACE blocks (as opposed to a GENERIC binding
within the type). This is due to the runtime table constructor
adding a table entry for each specific procedure of any explicit interface
of the right kind (e.g., READ(UNFORMATTED)) that it found, rather than
just the ones that pertain to the derived type in question. But
semantics also wasn't checking such interfaces for distinguishable
specific procedures, either.

Clean these up, improve the spelling of defined I/O procedure kinds
in error messages ("read(formatted)" rather than "READFORMATTED"),
and make error messages stemming from macro expansions only have
one "error:" prefix on the original message so that a new test
would work.

Diff Detail

Event Timeline

klausler created this revision.Jan 27 2023, 9:55 AM
Herald added a project: Restricted Project. · View Herald Transcript
klausler requested review of this revision.Jan 27 2023, 9:55 AM
vdonaldson accepted this revision.Jan 27 2023, 12:00 PM
This revision is now accepted and ready to land.Jan 27 2023, 12:00 PM
This revision was landed with ongoing or failed builds.Jan 29 2023, 10:15 AM
This revision was automatically updated to reflect the committed changes.