Skip to content

Fix show-model option#693

Merged
LKedward merged 2 commits intofortran-lang:mainfrom
zoziha:fix_model
May 28, 2022
Merged

Fix show-model option#693
LKedward merged 2 commits intofortran-lang:mainfrom
zoziha:fix_model

Conversation

@zoziha
Copy link
Copy Markdown
Contributor

@zoziha zoziha commented Apr 28, 2022

To close #615 .

Init the f_source%link_libraries array length as 0.

@zoziha zoziha requested review from LKedward and St-Maxwell April 28, 2022 13:11
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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.

Comment thread src/fpm_sources.f90 Outdated
@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