1! { dg-do compile }
2! { dg-options "-fdump-tree-original" }
3! Tests the fix for PR 31222, in which the type of the arguments of abs
4! and int below were not detected to be of default numeric type..
5!
6! Contributed by Tobias Burnus <burnus@gcc.gnu.org>
7!
8subroutine mysub1(a,b,mode,dis)
9!  integer :: mode
10!  real :: dis
11  dimension a(abs(mode)),b(int(dis))
12  print *, mod
13  write (*,*) abs(mode), nint(dis)
14end subroutine
15
16program testprog
17  call mysub1((/1.,2./),(/1.,2.,3./),-2, 3.2)
18end
19! { dg-final { cleanup-tree-dump "original" } }
20