Skip to content

Commit

Permalink
Bring some f90_correct tests into compliance with
Browse files Browse the repository at this point in the history
the Fortran language standards, which require that
derived type definitions put their definitions
of type parameters before any PRIVATE, SEQUENCE,
or component definition statements.
  • Loading branch information
tskeith committed Dec 13, 2017
1 parent adcc2a7 commit f474988
Show file tree
Hide file tree
Showing 26 changed files with 62 additions and 62 deletions.
6 changes: 3 additions & 3 deletions test/f90_correct/src/oop391.f90
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
! Copyright (c) 2012, NVIDIA CORPORATION. All rights reserved.
! Copyright (c) 2012-2017, NVIDIA CORPORATION. All rights reserved.
!
! Licensed under the Apache License, Version 2.0 (the "License");
! you may not use this file except in compliance with the License.
Expand All @@ -22,11 +22,11 @@ module mod
end type

type,extends(objects) :: stuff(k11,k22)
integer,kind :: k22 = 2
integer,kind :: k11
integer :: st
integer p
integer(k22) :: i
integer,kind :: k22 = 2
integer,kind :: k11
end type

contains
Expand Down
6 changes: 3 additions & 3 deletions test/f90_correct/src/oop392.f90
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
! Copyright (c) 2012, NVIDIA CORPORATION. All rights reserved.
! Copyright (c) 2012-2017, NVIDIA CORPORATION. All rights reserved.
!
! Licensed under the Apache License, Version 2.0 (the "License");
! you may not use this file except in compliance with the License.
Expand All @@ -21,11 +21,11 @@ module mod
end type

type,extends(objects) :: stuff(k11,k22)
integer,kind :: k22 = 2
integer,kind :: k11 = 3
integer :: st
integer p
integer(k22) :: i
integer,kind :: k22 = 2
integer,kind :: k11 = 3
end type

contains
Expand Down
6 changes: 3 additions & 3 deletions test/f90_correct/src/oop393.f90
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
! Copyright (c) 2012, NVIDIA CORPORATION. All rights reserved.
! Copyright (c) 2012-2017, NVIDIA CORPORATION. All rights reserved.
!
! Licensed under the Apache License, Version 2.0 (the "License");
! you may not use this file except in compliance with the License.
Expand All @@ -21,10 +21,10 @@ module mod
end type

type,extends(objects) :: stuff(k11,k22)
integer :: st
integer(k1) :: i
integer,kind :: k22 = selected_real_kind(1)
integer,kind :: k11 = 3
integer :: st
integer(k1) :: i
character(kind=k2) :: c
real(k22) :: j
integer d
Expand Down
4 changes: 2 additions & 2 deletions test/f90_correct/src/oop394.f90
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
! Copyright (c) 2012, NVIDIA CORPORATION. All rights reserved.
! Copyright (c) 2012-2017, NVIDIA CORPORATION. All rights reserved.
!
! Licensed under the Apache License, Version 2.0 (the "License");
! you may not use this file except in compliance with the License.
Expand All @@ -16,9 +16,9 @@
module mod
logical expect(3),rslt(3)
type :: stuff(k11,k22)
integer(k22) :: i
integer,kind :: k22 = 2
integer,kind :: k11
integer(k22) :: i
end type

end module
Expand Down
4 changes: 2 additions & 2 deletions test/f90_correct/src/oop395.f90
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
! Copyright (c) 2012, NVIDIA CORPORATION. All rights reserved.
! Copyright (c) 2012-2017, NVIDIA CORPORATION. All rights reserved.
!
! Licensed under the Apache License, Version 2.0 (the "License");
! you may not use this file except in compliance with the License.
Expand All @@ -16,9 +16,9 @@
module mod
logical expect(2),rslt(2)
type :: stuff(k11,k22)
integer(k22) :: i
integer,kind :: k22 = 2
integer,kind :: k11
integer(k22) :: i
end type
type :: stuff2
integer :: i
Expand Down
6 changes: 3 additions & 3 deletions test/f90_correct/src/oop402.f90
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
! Copyright (c) 2012, NVIDIA CORPORATION. All rights reserved.
! Copyright (c) 2012-2017, NVIDIA CORPORATION. All rights reserved.
!
! Licensed under the Apache License, Version 2.0 (the "License");
! you may not use this file except in compliance with the License.
Expand All @@ -21,10 +21,10 @@ module mod
end type

type,extends(objects) :: stuff(k11,k22)
integer :: st
integer(k1) :: i
integer,kind :: k22 = selected_real_kind(1)
integer,kind :: k11 = 3
integer :: st
integer(k1) :: i
character(kind=k2) :: c
real(k22) :: j
integer d
Expand Down
6 changes: 3 additions & 3 deletions test/f90_correct/src/oop403.f90
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
! Copyright (c) 2012, NVIDIA CORPORATION. All rights reserved.
! Copyright (c) 2012-2017, NVIDIA CORPORATION. All rights reserved.
!
! Licensed under the Apache License, Version 2.0 (the "License");
! you may not use this file except in compliance with the License.
Expand All @@ -21,10 +21,10 @@ module mod
end type

type,extends(objects) :: stuff(k11,k22)
integer :: st
integer(k1) :: i
integer,kind :: k22 = selected_real_kind(1)
integer,kind :: k11 = 3
integer :: st
integer(k1) :: i
character(kind=k2) :: c
real(k22) :: j
integer d
Expand Down
6 changes: 3 additions & 3 deletions test/f90_correct/src/oop404.f90
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
! Copyright (c) 2012, NVIDIA CORPORATION. All rights reserved.
! Copyright (c) 2012-2017, NVIDIA CORPORATION. All rights reserved.
!
! Licensed under the Apache License, Version 2.0 (the "License");
! you may not use this file except in compliance with the License.
Expand All @@ -21,10 +21,10 @@ module mod
end type

type,extends(objects) :: stuff(k11,k22)
integer :: st
integer(k1) :: i
integer,kind :: k22 = selected_real_kind(1)
integer,kind :: k11 = 3
integer :: st
integer(k1) :: i
character(kind=k2) :: c
real(k22) :: j
integer d
Expand Down
6 changes: 3 additions & 3 deletions test/f90_correct/src/oop405.f90
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
! Copyright (c) 2012, NVIDIA CORPORATION. All rights reserved.
! Copyright (c) 2012-2017, NVIDIA CORPORATION. All rights reserved.
!
! Licensed under the Apache License, Version 2.0 (the "License");
! you may not use this file except in compliance with the License.
Expand All @@ -21,10 +21,10 @@ module mod
end type

type,extends(objects) :: stuff(k11,k22)
integer :: st
integer(k1) :: i
integer,kind :: k22 = selected_real_kind(1)
integer,kind :: k11 = 3
integer :: st
integer(k1) :: i
character(kind=k2) :: c
real(k22) :: j
integer d
Expand Down
6 changes: 3 additions & 3 deletions test/f90_correct/src/oop407.f90
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
! Copyright (c) 2012, NVIDIA CORPORATION. All rights reserved.
! Copyright (c) 2012-2017, NVIDIA CORPORATION. All rights reserved.
!
! Licensed under the Apache License, Version 2.0 (the "License");
! you may not use this file except in compliance with the License.
Expand All @@ -22,10 +22,10 @@ module mod
end type

type,extends(objects) :: stuff(k11,k22)
integer :: st
integer(k1) :: i
integer,kind :: k22 = selected_real_kind(1)
integer,kind :: k11 = 3
integer :: st
integer(k1) :: i
character(kind=k2) :: c
real(k22) :: j
integer d
Expand Down
6 changes: 3 additions & 3 deletions test/f90_correct/src/oop427.f90
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
! Copyright (c) 2012, NVIDIA CORPORATION. All rights reserved.
! Copyright (c) 2012-2017, NVIDIA CORPORATION. All rights reserved.
!
! Licensed under the Apache License, Version 2.0 (the "License");
! you may not use this file except in compliance with the License.
Expand All @@ -21,10 +21,10 @@ module mod
end type

type,extends(objects) :: stuff(k11,k22)
integer :: st
integer(k1) :: i
integer,kind :: k22 = selected_real_kind(1)
integer,kind :: k11 = 3
integer :: st
integer(k1) :: i
character(kind=k2) :: c
real(k22) :: j
integer d
Expand Down
4 changes: 2 additions & 2 deletions test/f90_correct/src/oop433.f90
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
! Copyright (c) 2012, NVIDIA CORPORATION. All rights reserved.
! Copyright (c) 2012-2017, NVIDIA CORPORATION. All rights reserved.
!
! Licensed under the Apache License, Version 2.0 (the "License");
! you may not use this file except in compliance with the License.
Expand All @@ -16,8 +16,8 @@
program p
implicit none
type :: objects(l1)
character(len=l1) :: c
integer, len :: l1 = 10
character(len=l1) :: c
integer p(l1)
end type

Expand Down
4 changes: 2 additions & 2 deletions test/f90_correct/src/oop434.f90
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
! Copyright (c) 2012, NVIDIA CORPORATION. All rights reserved.
! Copyright (c) 2012-2017, NVIDIA CORPORATION. All rights reserved.
!
! Licensed under the Apache License, Version 2.0 (the "License");
! you may not use this file except in compliance with the License.
Expand All @@ -17,8 +17,8 @@ program p
implicit none
logical rslt(2),expect(2)
type :: objects(l1)
character(len=l1) :: c
integer, len :: l1 = 10
character(len=l1) :: c
end type


Expand Down
4 changes: 2 additions & 2 deletions test/f90_correct/src/oop435.f90
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
! Copyright (c) 2012, NVIDIA CORPORATION. All rights reserved.
! Copyright (c) 2012-2017, NVIDIA CORPORATION. All rights reserved.
!
! Licensed under the Apache License, Version 2.0 (the "License");
! you may not use this file except in compliance with the License.
Expand All @@ -17,8 +17,8 @@ program p
implicit none
logical rslt(2),expect(2)
type :: objects(l1)
character(len=l1) :: c
integer, kind :: l1 = 10
character(len=l1) :: c
end type


Expand Down
4 changes: 2 additions & 2 deletions test/f90_correct/src/oop438.f90
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
! Copyright (c) 2012, NVIDIA CORPORATION. All rights reserved.
! Copyright (c) 2012-2017, NVIDIA CORPORATION. All rights reserved.
!
! Licensed under the Apache License, Version 2.0 (the "License");
! you may not use this file except in compliance with the License.
Expand All @@ -16,9 +16,9 @@
module mod
implicit none
type :: objects(l1)
integer, kind :: l1 = 10
character(len=l1) :: c
integer p(l1)
integer, kind :: l1 = 10
end type
end module

Expand Down
4 changes: 2 additions & 2 deletions test/f90_correct/src/oop439.f90
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
! Copyright (c) 2012, NVIDIA CORPORATION. All rights reserved.
! Copyright (c) 2012-2017, NVIDIA CORPORATION. All rights reserved.
!
! Licensed under the Apache License, Version 2.0 (the "License");
! you may not use this file except in compliance with the License.
Expand All @@ -16,9 +16,9 @@
module mod
implicit none
type :: objects(l1)
integer, len :: l1 = 10
character(len=l1) :: c
integer :: p(l1)
integer, len :: l1 = 10
end type
end module

Expand Down
4 changes: 2 additions & 2 deletions test/f90_correct/src/oop440.f90
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
! Copyright (c) 2012, NVIDIA CORPORATION. All rights reserved.
! Copyright (c) 2012-2017, NVIDIA CORPORATION. All rights reserved.
!
! Licensed under the Apache License, Version 2.0 (the "License");
! you may not use this file except in compliance with the License.
Expand All @@ -16,9 +16,9 @@
module mod
implicit none
type :: objects(l1)
integer, len :: l1 = 10
character(len=l1) :: c
integer :: p(l1)
integer, len :: l1 = 10
end type
end module

Expand Down
4 changes: 2 additions & 2 deletions test/f90_correct/src/oop443.f90
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
! Copyright (c) 2012, NVIDIA CORPORATION. All rights reserved.
! Copyright (c) 2012-2017, NVIDIA CORPORATION. All rights reserved.
!
! Licensed under the Apache License, Version 2.0 (the "License");
! you may not use this file except in compliance with the License.
Expand All @@ -17,9 +17,9 @@ module mod
logical expect(12),rslt(12)

type :: objects(k1,l1)
integer:: p(l1)
integer, len :: l1 = 10
integer, kind:: k1=selected_int_kind(2)
integer:: p(l1)
character(len=l1) :: c
integer(k1):: d
end type
Expand Down
6 changes: 3 additions & 3 deletions test/f90_correct/src/oop444.f90
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
! Copyright (c) 2012, NVIDIA CORPORATION. All rights reserved.
! Copyright (c) 2012-2017, NVIDIA CORPORATION. All rights reserved.
!
! Licensed under the Apache License, Version 2.0 (the "License");
! you may not use this file except in compliance with the License.
Expand All @@ -17,11 +17,11 @@ module mod
logical expect(12),rslt(12)

type :: objects(k1,l1)
integer:: p(l1)
integer, kind:: k1=selected_int_kind(2)
integer, len :: l1 = 10
integer:: p(l1)
character(len=l1) :: c
integer(k1):: d
integer, len :: l1 = 10
end type
contains
subroutine foo(x,n)
Expand Down
4 changes: 2 additions & 2 deletions test/f90_correct/src/oop447.f90
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
! Copyright (c) 2012, NVIDIA CORPORATION. All rights reserved.
! Copyright (c) 2012-2017, NVIDIA CORPORATION. All rights reserved.
!
! Licensed under the Apache License, Version 2.0 (the "License");
! you may not use this file except in compliance with the License.
Expand All @@ -16,9 +16,9 @@
module mod
logical expect(8),rslt(8)
type :: stuff(k11,k22)
integer(k22) :: i
integer,kind :: k22 = 2
integer,kind :: k11 = 4
integer(k22) :: i
integer(k22) :: j
end type
end module
Expand Down
4 changes: 2 additions & 2 deletions test/f90_correct/src/oop449.f90
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
! Copyright (c) 2012, NVIDIA CORPORATION. All rights reserved.
! Copyright (c) 2012-2017, NVIDIA CORPORATION. All rights reserved.
!
! Licensed under the Apache License, Version 2.0 (the "License");
! you may not use this file except in compliance with the License.
Expand All @@ -16,9 +16,9 @@
module mod
logical expect(12),rslt(12)
type :: stuff(k11,k22)
integer(k11) :: i = 3
integer,len :: k22 = 20
integer,kind :: k11 = 4
integer(k11) :: i = 3
integer(k11) :: j=4
integer :: p(k22)
end type
Expand Down
4 changes: 2 additions & 2 deletions test/f90_correct/src/oop468.f90
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
! Copyright (c) 2012, NVIDIA CORPORATION. All rights reserved.
! Copyright (c) 2012-2017, NVIDIA CORPORATION. All rights reserved.
!
! Licensed under the Apache License, Version 2.0 (the "License");
! you may not use this file except in compliance with the License.
Expand All @@ -18,8 +18,8 @@ module mod
type :: objects(k1,k2,l1)
integer, kind :: k1 = 3
integer, kind :: k2 = selected_char_kind("ASCII")
character(kind=k2,len=l1) :: c
integer, len :: l1
character(kind=k2,len=l1) :: c
integer :: a(1+l1)
!integer a(1+l1)
end type
Expand Down
Loading

0 comments on commit f474988

Please sign in to comment.