Skip to content

[flang] added write-after-endfile testcase#396

Open
blazie2004 wants to merge 4 commits into
llvm:mainfrom
blazie2004:CPE-15515
Open

[flang] added write-after-endfile testcase#396
blazie2004 wants to merge 4 commits into
llvm:mainfrom
blazie2004:CPE-15515

Conversation

@blazie2004
Copy link
Copy Markdown

This test verifies that Fortran I/O statements correctly handle error conditions when ERR= and IOSTAT= specifiers are present. Per Fortran standard 12.11.2, when an error occurs during I/O and either ERR= or IOSTAT= is specified.

PR: 191633

@tarunprabhu tarunprabhu requested a review from kwyatt-ext April 27, 2026 11:46
@tarunprabhu
Copy link
Copy Markdown
Contributor

@kwyatt-ext,

Is this test being added to the correct subdirectory of the cray tests?

@kwyatt-ext
Copy link
Copy Markdown
Contributor

I will review this. I'm contacting the author about the related PR first.

@kwyatt-ext kwyatt-ext changed the title added write-after-endfile testcase [flang] added write-after-endfile testcase Apr 27, 2026
Comment thread Fortran/cray/f90/10/write-after-endfile.f90 Outdated
Comment thread Fortran/cray/f90/10/write-after-endfile.f90 Outdated
Comment thread Fortran/cray/f90/10/write-after-endfile.f90 Outdated
Comment thread Fortran/cray/f90/10/write-after-endfile.f90
Comment thread Fortran/cray/f90/10/write-after-endfile.f90 Outdated
@kwyatt-ext
Copy link
Copy Markdown
Contributor

Hi @blazie2004. I have a couple of general recommendations:

  • Please don't force-push successive commits to a PR. It erases the history. If a reviewer can't see the diff between their comments and your current push, they end up reviewing the whole change each time. The extra commit history will be compressed into one entry when the change is squashed and merged.

  • Please hit the "Re-request Review", button when you are ready for the reviewer to look again. I assume you are ready since you did a force-push, but am not sure if you intended to hand it back at this point.

Thank you.

@tarunprabhu
Copy link
Copy Markdown
Contributor

tarunprabhu commented Apr 29, 2026

@blazie2004, Please see LLVM's developer guide on pull requests - in particular, the sections on updating and rebasing PR's.

Copy link
Copy Markdown
Contributor

@kwyatt-ext kwyatt-ext left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After you remove the extra file, this should be ready to go, with the following exceptions:

  • It still will NOT pass with the draft PR code changes.
  • It can not be merged until the associated fix has been merged.

@@ -0,0 +1,52 @@
program test_io_err
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You need to delete write-after-endfile.f90 from your commit.

k after CLOSE: 55
iostat after read: 0 k: 65
iostat after write: 0 k: 65
FAIL No newline at end of file
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The test fails?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Eugene is right. This expected output is not correct. If your test is successful in branching to the error label for the last 2 cases, then your "k" value should be "66" for both and the final should be PASS.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants