@@ -378,6 +378,7 @@ contains
378378 type(error_type), allocatable, intent(out) :: error
379379 ${t1}$ :: x(6) = [${t1}$ :: 0, 5, 15, 30, 50, 75]
380380 ${t1}$ :: A(1, 3) = reshape([${t1}$ :: 1, 3, 5], [1, 3])
381+ ${t1}$ :: B(2) = [${t1}$ :: 1, 2]
381382
382383 call check(error, all_close(diff(x), [${t1}$ :: 5, 10, 15, 20, 25]), &
383384 "diff(x) in test_diff_real_${k1}$ failed")
@@ -391,6 +392,10 @@ contains
391392 "diff(x, n=1, dim=2) in test_diff_real_${k1}$ failed")
392393 if (allocated(error)) return
393394
395+ call check(error, size(diff(B, 2)), 0, "size(diff(B, 2)) in test_diff_real_${k1}$ failed")
396+ if (allocated(error)) return
397+ call check(error, size(diff(B, 3)), 0, "size(diff(B, 3)) in test_diff_real_${k1}$ failed")
398+
394399 end subroutine test_diff_real_${k1}$
395400 #:endfor
396401
@@ -399,6 +404,7 @@ contains
399404 type(error_type), allocatable, intent(out) :: error
400405 ${t1}$ :: x(6) = [${t1}$ :: 0, 5, 15, 30, 50, 75]
401406 ${t1}$ :: A(1, 3) = reshape([${t1}$ :: 1, 3, 5], [1, 3])
407+ ${t1}$ :: B(2) = [${t1}$ :: 1, 2]
402408
403409 call check(error, all(diff(x) == [${t1}$ :: 5, 10, 15, 20, 25]), &
404410 "diff(x) in test_diff_int_${k1}$ failed")
@@ -412,6 +418,10 @@ contains
412418 "diff(A, n=1, dim=2) in test_diff_int_${k1}$ failed")
413419 if (allocated(error)) return
414420
421+ call check(error, size(diff(B, 2)), 0, "size(diff(B, 2)) in test_diff_real_${k1}$ failed")
422+ if (allocated(error)) return
423+ call check(error, size(diff(B, 3)), 0, "size(diff(B, 3)) in test_diff_real_${k1}$ failed")
424+
415425 end subroutine test_diff_int_${k1}$
416426 #:endfor
417427
0 commit comments