-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix issue with installation of gfortran 11
On my own repo I had issues running programs compiled with gfortran 11 in CI. It turned out they were being compiled with gfortran 11, but were picking up libgfortran-5.dll from /c/mingw64/bin, which is from gcc 12, at runtime, and would crash. I've modified hw.90 to reproduce the problem as minimally as I can, although perhaps someone else can make it more minimal. I've temporarily added an intentionally failing action to demonstrate the issue, obviously we would remove that ahead of merging. I also added gcc 12 to the test matrix. It claims to be supported so it seems only logical to test it in addition to 11 and 13.
- Loading branch information
1 parent
05091bb
commit bdff5be
Showing
4 changed files
with
41 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,22 @@ | ||
program hello | ||
print *, "hello world" | ||
end program hello | ||
program bobyqa_exmp | ||
implicit none | ||
|
||
logical :: parent_logical_array(20) | ||
integer(4), allocatable :: locations(:) | ||
|
||
locations = true_locations(parent_logical_array) | ||
print *, "hello world" | ||
|
||
contains | ||
|
||
function true_locations(logical_array) result(location_array) | ||
implicit none | ||
logical, intent(in) :: logical_array(:) | ||
integer(4), allocatable :: location_array(:) | ||
integer(4) :: n, monotone_array(size(logical_array)) | ||
n = count(logical_array) | ||
allocate(location_array(1:n)) | ||
location_array = pack(monotone_array, mask=logical_array) | ||
|
||
end function true_locations | ||
end program bobyqa_exmp |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters