Skip to content

Conversation

perazz
Copy link
Member

@perazz perazz commented May 16, 2024

I noticed a typo in det that does not deallocate the internal pointer matrix properly: it should be when the temporary is created (copy_a==.true.):

if (.not.copy_a) deallocate(amat)

I don't know why an error was never printed in the tests, as it should be impossible to deallocate the target
of a pointer, if this is not allocatable.
Anyways this is a fix for it, plus an additional test.

cc: @jvdp1 @jalvesz

Copy link
Member

@jvdp1 jvdp1 left a comment

Choose a reason for hiding this comment

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

LGTM. Thank you @perazz

@perazz
Copy link
Member Author

perazz commented May 16, 2024

Thank you @jvdp1. I will merge this as it was a clear bug.

@perazz perazz merged commit 42182b0 into fortran-lang:master May 16, 2024
@perazz perazz deleted the fix_deallocate branch May 16, 2024 10:11
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