Skip to content

[Fortran][test-suite] Update empty BIND(C) derived type expectations#387

Open
Saieiei wants to merge 1 commit intollvm:mainfrom
Saieiei:flang-bind-c-empty-derived-type-xfail
Open

[Fortran][test-suite] Update empty BIND(C) derived type expectations#387
Saieiei wants to merge 1 commit intollvm:mainfrom
Saieiei:flang-bind-c-empty-derived-type-xfail

Conversation

@Saieiei
Copy link
Copy Markdown

@Saieiei Saieiei commented Apr 22, 2026

This updates the Fortran test-suite fallout from llvm/llvm-project#193452.

Flang now correctly diagnoses empty BIND(C) derived types as errors, so empty_derived_type.f90 is marked xfail, and empty_derived_type_2.f90 is removed from FAILING_FILES now that it produces the expected error.

Copy link
Copy Markdown
Contributor

@tarunprabhu tarunprabhu left a comment

Choose a reason for hiding this comment

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

Please do not update tests.cmake by hand. There is a large banner at the top that says that file must not be edited.

If the file is xfail in flang but is expected to pass in gfortran, see the README.md on how to use override.yaml to override the annotations.

@Saieiei Saieiei force-pushed the flang-bind-c-empty-derived-type-xfail branch from 553e1ab to 7299791 Compare April 22, 2026 16:24
@Saieiei
Copy link
Copy Markdown
Author

Saieiei commented Apr 22, 2026

My bad, I should have caught that. Thanks.

I switched this to use override.yaml, regenerated tests.cmake with utils/update-test-config.py, and updated the PR. With the corrected changes, both empty_derived_type.f90 and empty_derived_type_2.f90 now pass.

@Saieiei Saieiei requested a review from tarunprabhu April 22, 2026 16:24
Update the empty BIND(C) derived type tests to match Flang's current behavior.

empty_derived_type.f90 is now marked xfail, and empty_derived_type_2.f90 is removed from FAILING_FILES because Flang now produces the expected error.
@Saieiei Saieiei force-pushed the flang-bind-c-empty-derived-type-xfail branch from 7299791 to e512115 Compare April 22, 2026 16:27
Copy link
Copy Markdown
Contributor

@tarunprabhu tarunprabhu left a comment

Choose a reason for hiding this comment

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

Thanks. A small request and we should be good to go.

"unsigned_21.f90":
disabled_on: ["powerpc-*-aix"]

# Flang now diagnoses empty BIND(C) derived types as errors.
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.

Do you mind providing a bit more context here? Something like the following.

Suggested change
# Flang now diagnoses empty BIND(C) derived types as errors.
# Flang now diagnoses empty BIND(C) derived types as errors. gfortran issues
# a warning in this case.

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.

2 participants