Skip to content

Add test for enumeration out parameters #262

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 25, 2019

Conversation

tjj2017
Copy link
Collaborator

@tjj2017 tjj2017 commented Jun 29, 2019

Test currently fails with gnat2goto raising:
SYSTEM.ASSERTIONS.ASSERT_FAILURE : failed precondition from ireps.ads:1875

gnat2goto fails with above precondition failure when translating UKNI/main.adb line 247 which calls a procedure with an enumeration out parameter. This small test program replicates the same fault.

The problem seems to lie in gnat2goto driver/tree_walk.adb procedure Handle_Parameter. The function Wrap_Argument is called with a parameter obtained from the call of the function Handle_Enum_Symbol_Members which appears to return the wrong sort of Irep for the function Make_Address_Of called by Wrap_Argument.

Test currently fails with gnat2goto raising:
SYSTEM.ASSERTIONS.ASSERT_FAILURE : failed precondition from ireps.ads:1875
@tjj2017
Copy link
Collaborator Author

tjj2017 commented Jun 29, 2019

This problem has been raised as Issue #264

Copy link
Contributor

@xbauch xbauch left a comment

Choose a reason for hiding this comment

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

Looks good.

Copy link
Contributor

@NlightNFotis NlightNFotis left a comment

Choose a reason for hiding this comment

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

LGTM

@martin-cs martin-cs merged commit 57a2cd3 into diffblue:master Jul 25, 2019
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.

5 participants