-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'upstream/main'
- Loading branch information
Showing
554 changed files
with
22,324 additions
and
502 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
! { dg-do compile } | ||
! { dg-options "-Ofast" } | ||
SUBROUTINE sedi_1D(QX1d, DZ1d,kdir,BX1d,kbot,ktop) | ||
real, dimension(:) :: QX1d,DZ1d | ||
real, dimension(size(QX1d)) :: VVQ | ||
logical BX_present | ||
do k= kbot,ktop,kdir | ||
VVQ= VV_Q0 | ||
enddo | ||
Vxmaxx= min0 | ||
if (kdir==1) then | ||
dzMIN = minval(DZ1d) | ||
endif | ||
npassx= Vxmaxx/dzMIN | ||
DO nnn= 1,npassx | ||
if (BX_present) then | ||
do k= ktop,kdir | ||
BX1d= iDZ1d0 | ||
enddo | ||
endif | ||
ENDDO | ||
END |
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 |
---|---|---|
@@ -0,0 +1,22 @@ | ||
! { dg-do compile } | ||
! { dg-options "-Ofast" } | ||
subroutine shr_map_checkFldStrshr_map_mapSet_dest(ndst,max0,eps,sum0,maxval0,min0,nidnjd,renorm) | ||
allocatable sum(:) | ||
logical renorm | ||
allocate(sum(ndst)) | ||
do n=1,ndst | ||
if (sum0 > eps) then | ||
rmax = max0 | ||
endif | ||
enddo | ||
if (renorm) then | ||
rmin = maxval0 | ||
rmax = minval(sum) | ||
do n=1,nidnjd | ||
if (sum0 > eps) then | ||
rmin = min0 | ||
endif | ||
enddo | ||
write(*,*) rmin,rmax | ||
endif | ||
end |
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 |
---|---|---|
@@ -0,0 +1,50 @@ | ||
! { dg-do compile } | ||
! { dg-options "-Warray-temporaries" } | ||
! Test fix for incorrectly passing array component to unlimited polymorphic procedure | ||
|
||
module test_PR105658_mod | ||
implicit none | ||
type :: foo | ||
integer :: member1 | ||
integer :: member2 | ||
end type foo | ||
contains | ||
subroutine print_poly(array) | ||
class(*), dimension(:), intent(in) :: array | ||
select type(array) | ||
type is (integer) | ||
print*, array | ||
type is (character(*)) | ||
print *, array | ||
end select | ||
end subroutine print_poly | ||
|
||
subroutine do_print(thing) | ||
type(foo), dimension(3), intent(in) :: thing | ||
type(foo), parameter :: y(3) = [foo(1,2),foo(3,4),foo(5,6)] | ||
integer :: i, j, uu(5,6) | ||
|
||
call print_poly(thing%member1) ! { dg-warning "array temporary" } | ||
call print_poly(y%member2) ! { dg-warning "array temporary" } | ||
call print_poly(y(1::2)%member2) ! { dg-warning "array temporary" } | ||
|
||
! The following array sections work without temporaries | ||
uu = reshape([(((10*i+j),i=1,5),j=1,6)],[5,6]) | ||
print *, uu(2,2::2) | ||
call print_poly (uu(2,2::2)) ! no temp needed! | ||
print *, uu(1::2,6) | ||
call print_poly (uu(1::2,6)) ! no temp needed! | ||
end subroutine do_print | ||
|
||
subroutine do_print2(thing2) | ||
class(foo), dimension(:), intent(in) :: thing2 | ||
call print_poly (thing2% member2) ! { dg-warning "array temporary" } | ||
end subroutine do_print2 | ||
|
||
subroutine do_print3 () | ||
character(3) :: c(3) = ["abc","def","ghi"] | ||
call print_poly (c(1::2)) ! no temp needed! | ||
call print_poly (c(1::2)(2:3)) ! { dg-warning "array temporary" } | ||
end subroutine do_print3 | ||
|
||
end module test_PR105658_mod |
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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
! { dg-do compile } | ||
! { dg-options "-fno-move-loop-invariants -Oz" } | ||
module module_foo | ||
use iso_c_binding | ||
contains | ||
subroutine foo(a) bind(c) | ||
type(c_ptr) a(..) | ||
select rank(a) | ||
end select | ||
call bar | ||
end | ||
end |
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
Oops, something went wrong.