This is an archive of the discontinued LLVM Phabricator instance.

[flang] Move check for statement function in BLOCK construct
ClosedPublic

Authored by klausler on Mar 1 2023, 12:58 PM.

Details

Summary

A BLOCK construct may not contain a statement function definition;
but it may of course contain an assignment statement with an array
element on its left-hand side that looks like a statement function
definition. These misparsed statement functions are converted
into assignment statements during semantics once it is clear what
they are. Move the C1107 check for a statement function definition
in a block construct into declaration checking, which is where it
probably should have been in the first place anyway.

Diff Detail

Event Timeline

klausler created this revision.Mar 1 2023, 12:58 PM
Herald added a project: Restricted Project. · View Herald TranscriptMar 1 2023, 12:58 PM
klausler requested review of this revision.Mar 1 2023, 12:58 PM
vdonaldson accepted this revision.Mar 1 2023, 1:39 PM

Thanks for the fix!

This revision is now accepted and ready to land.Mar 1 2023, 1:39 PM