Skip to content
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

Fix show-model option #693

Merged
merged 2 commits into from
May 28, 2022
Merged

Fix show-model option #693

merged 2 commits into from
May 28, 2022

Conversation

zoziha
Copy link
Contributor

@zoziha zoziha commented Apr 28, 2022

To close #615 .

Init the f_source%link_libraries array length as 0.

Copy link
Member

@St-Maxwell St-Maxwell left a comment

Choose a reason for hiding this comment

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

It's OK.

Copy link
Member

@milancurcic milancurcic 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, the issue from #615 goes away for me with this patch. Thank you!

@zoziha
Copy link
Contributor Author

zoziha commented May 27, 2022

This is a relatively small correction, mainly to initialize the length of the allocatable array f_source%link_libraries to prevent access segfaults.
If possible, it seems that the PR can pass ~

Copy link
Member

@LKedward LKedward left a comment

Choose a reason for hiding this comment

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

Thanks for this @zoziha and many apologies for the delay in reviewing. I needed to double-check why this wasn't breaking the link_executable example package test case, but this all looks fine to me.

The actual link_libraries are populated in the add_executable_sources routine which applies any executable-specific information from the manifest (such as link_libraries). Your changes don't break this because of (re)allocation-on-assignment.

src/fpm_sources.f90 Outdated Show resolved Hide resolved
@LKedward LKedward merged commit 7734124 into fortran-lang:main May 28, 2022
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.

Trouble with --show-model
4 participants