Skip to content

Commit 978c818

Browse files
committed
fixed to make flang happy
1 parent 1f569cf commit 978c818

File tree

10 files changed

+20
-16
lines changed

10 files changed

+20
-16
lines changed

src/operation/builtin/trace_operation.f90

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ pure function is_elemental()
5757
is_elemental = .false.
5858
end function
5959

60-
pure subroutine get_info(argspec, help)
60+
subroutine get_info(argspec, help)
6161
type(arg_entry_t), intent(out), allocatable, optional :: argspec(:)
6262
character(len=:), intent(out), allocatable, optional :: help
6363

src/operation/database.f90

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ module operation_database_m
2929

3030
contains
3131

32-
pure subroutine operation_db_init(operation_db)
32+
subroutine operation_db_init(operation_db)
3333
use operation_mksequence_m
3434
use operation_item_m
3535
use operation_trace_m
@@ -41,12 +41,12 @@ pure subroutine operation_db_init(operation_db)
4141
call add_operation(operation_db, op_trace_t())
4242
end subroutine
4343

44-
pure function operation_db_new()
44+
function operation_db_new()
4545
type(operation_db_t) :: operation_db_new !! operation catalog
4646
call operation_db_init(operation_db_new)
4747
end function
4848

49-
pure subroutine fetch_operation(operation_db, opname, op, err)
49+
subroutine fetch_operation(operation_db, opname, op, err)
5050
!! fetches an operation from the operation database based on its name
5151

5252
type(operation_db_t), intent(in) :: operation_db !! operation catalog
@@ -93,7 +93,7 @@ pure subroutine fetch_operation(operation_db, opname, op, err)
9393

9494
end subroutine
9595

96-
pure subroutine add_operation(operation_db, op, err)
96+
subroutine add_operation(operation_db, op, err)
9797
!! fetches an operation from the operation database based on its name
9898

9999
type(operation_db_t), intent(inout) :: operation_db !! operation catalog

src/operation/example/pow.f90

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ pure function powd_name() result(name)
4646
name = "pow"
4747
end function
4848

49-
pure subroutine get_info(argspec, help)
49+
subroutine get_info(argspec, help)
5050
type(arg_entry_t), intent(out), allocatable, optional :: argspec(:)
5151
character(len=:), intent(out), allocatable, optional :: help
5252

src/operation/example/square.f90

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ pure function squared_name() result(name)
4141
name = "squared"
4242
end function
4343

44-
pure subroutine get_info(argspec, help)
44+
subroutine get_info(argspec, help)
4545
type(arg_entry_t), intent(out), allocatable, optional :: argspec(:)
4646
character(len=:), intent(out), allocatable, optional :: help
4747

src/operation/input_args.f90

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ module input_args_m
1515
type input_key_t
1616
logical :: has_key = .false.
1717
character(len=key_max_len) :: key = ""
18-
type(token_loc_t) :: loc
18+
type(token_loc_t) :: loc = token_loc_t()
1919
end type input_key_t
2020

2121
public :: input_key_t
@@ -115,6 +115,8 @@ subroutine collect_keys(argspec, actual_keys, key_positions, err)
115115
character(len=:), allocatable :: current_key
116116
type(set_t) :: valid_keys
117117

118+
valid_keys%hasher => fnv_hash
119+
118120
keyword_section = .false.
119121

120122
if (size(actual_keys) > size(argspec)) then
@@ -178,6 +180,8 @@ subroutine match_arguments(argspec, actual_keys, match, err)
178180
type(dict_t) :: key_positions
179181
integer :: iarg
180182

183+
key_positions % hasher => fnv_hash
184+
181185
if (size(match) /= size(argspec)) then
182186
error stop "match_arguments: Dimensions of argspec and match must be the same."
183187
end if

src/operation/namespace.f90

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ module namespace_m
2525

2626
contains
2727

28-
pure subroutine namespace_push_value(namespace, key, value, err)
28+
subroutine namespace_push_value(namespace, key, value, err)
2929
class(namespace_t), intent(inout) :: namespace
3030
character(len=*), intent(in) :: key
3131
class(value_t), intent(in) :: value
@@ -37,7 +37,7 @@ pure subroutine namespace_push_value(namespace, key, value, err)
3737
call namespace_move_value_in(namespace, key, new_value, err)
3838
end subroutine
3939

40-
pure subroutine namespace_move_value_in(namespace, key, value, err)
40+
subroutine namespace_move_value_in(namespace, key, value, err)
4141
class(namespace_t), intent(inout) :: namespace
4242
character(len=*), intent(in) :: key
4343
class(value_t), intent(inout), allocatable :: value
@@ -62,7 +62,7 @@ pure subroutine namespace_move_value_in(namespace, key, value, err)
6262

6363
end subroutine
6464

65-
pure subroutine namespace_fetch_value(namespace, key, value, err)
65+
subroutine namespace_fetch_value(namespace, key, value, err)
6666
class(namespace_t), intent(in) :: namespace
6767
character(len=*), intent(in) :: key
6868
class(value_t), allocatable, intent(inout) :: value
@@ -84,7 +84,7 @@ pure subroutine namespace_fetch_value(namespace, key, value, err)
8484

8585
end subroutine
8686

87-
pure subroutine namespace_fetch_ptr(namespace, key, ptr, err)
87+
subroutine namespace_fetch_ptr(namespace, key, ptr, err)
8888
!! Fetches pointer to value of item contained in a namespace.
8989
class(namespace_t), intent(inout), target :: namespace
9090
!! Namespace - must be target!

src/operation/operation.f90

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ pure function is_elemental()
197197
is_elemental = .true.
198198
end function is_elemental
199199

200-
pure subroutine get_info(argspec, help)
200+
subroutine get_info(argspec, help)
201201
type(arg_entry_t), intent(out), allocatable, optional :: argspec(:)
202202
character(len=:), intent(out), allocatable, optional :: help
203203
end subroutine

src/parser/ast.f90

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ function ast_expr_op_name_args(op_name, num_args, args, keys, loc) result(val_ex
132132
!> This procedure performs a (deep) copy of AST nodes.
133133
!> This is only needed to work around gfortran bug
134134
!> preventing correct copies and causing double free error.
135-
recursive pure subroutine ast_expression_copy(to, from)
135+
recursive subroutine ast_expression_copy(to, from)
136136
!> Node to copy to.
137137
type(ast_expression_t), intent(inout) :: to
138138
!> Node to copy from.

src/parser/token.f90

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ module token_m
2222
type, public :: token_t
2323
integer :: type = token_none
2424
character(len=:), allocatable :: value
25-
type(token_loc_t) :: loc
25+
type(token_loc_t) :: loc = token_loc_t()
2626
end type
2727

2828

src/value/value.f90

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ module value_m
1818
public :: value_trace_t
1919

2020
type, abstract :: value_t
21-
type(value_trace_t) :: trace
21+
type(value_trace_t) :: trace = value_trace_t()
2222
contains
2323
procedure :: get_trace
2424
procedure :: to_str

0 commit comments

Comments
 (0)