Skip to content

Change test7 in functionDeclEnd.c to infer a valid bound#684

Merged
john-h-kastner merged 1 commit into
mainfrom
fix_bound_in_test
Aug 18, 2021
Merged

Change test7 in functionDeclEnd.c to infer a valid bound#684
john-h-kastner merged 1 commit into
mainfrom
fix_bound_in_test

Conversation

@john-h-kastner

Copy link
Copy Markdown
Collaborator

Fixes #682.

The purpose of this function was to test function declaration rewriting
for itype array pointers declared with bounds but without an explicit
itype. This is equally well tested when a correct bound is inferred for
the parameter array.

This could probably be done a few other ways. What's important though
is that there is still a bound on the return without an itype expression,
and that that the function declaration is rewritten with and without -alltypes.

The purpose of this function was to test function declaration rewriting
for itype array pointers declared with bounds but without an explicit
itype. This is equally well tested when a correct bound is inferred for
the parameter array.
@aaronjeline aaronjeline self-assigned this Aug 18, 2021

@aaronjeline aaronjeline left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Looks fine and all tests pass

@mattmccutchen-cci

Copy link
Copy Markdown
Member

Ideally we should also test in combination with checkedc#1150 to make sure we achieved the original goal. I've just done that now, and the test passed as expected.

I'll let Microsoft know that they can cherry-pick this change if they like, but I see no harm in merging it to our main now in any event.

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.

Fix functionDeclEnd.c test that fails new return value bounds check

3 participants