@@ -53,7 +53,7 @@ module fpm_manifest_profile
53
53
& info_profile, find_profile, DEFAULT_COMPILER
54
54
55
55
! > Name of the default compiler
56
- character (len=* ), parameter :: DEFAULT_COMPILER = ' gfortran'
56
+ character (len=* ), parameter :: DEFAULT_COMPILER = ' gfortran'
57
57
integer , parameter :: OS_ALL = - 1
58
58
character (len= :), allocatable :: path
59
59
@@ -78,7 +78,7 @@ module fpm_manifest_profile
78
78
79
79
! > Value repesenting OS
80
80
integer :: os_type
81
-
81
+
82
82
! > Fortran compiler flags
83
83
character (len= :), allocatable :: flags
84
84
@@ -110,16 +110,16 @@ module fpm_manifest_profile
110
110
function new_profile (profile_name , compiler , os_type , flags , c_flags , cxx_flags , &
111
111
link_time_flags , file_scope_flags , is_built_in ) &
112
112
& result(profile)
113
-
113
+
114
114
! > Name of the profile
115
115
character (len=* ), intent (in ) :: profile_name
116
-
116
+
117
117
! > Name of the compiler
118
118
character (len=* ), intent (in ) :: compiler
119
-
119
+
120
120
! > Type of the OS
121
121
integer , intent (in ) :: os_type
122
-
122
+
123
123
! > Fortran compiler flags
124
124
character (len=* ), optional , intent (in ) :: flags
125
125
@@ -190,7 +190,7 @@ subroutine validate_compiler_name(compiler_name, is_valid)
190
190
is_valid = .false.
191
191
end select
192
192
end subroutine validate_compiler_name
193
-
193
+
194
194
! > Check if os_name is a valid name of a supported OS
195
195
subroutine validate_os_name (os_name , is_valid )
196
196
@@ -373,10 +373,10 @@ subroutine get_flags(profile_name, compiler_name, os_type, key_list, table, prof
373
373
& flags, c_flags, cxx_flags, link_time_flags, file_scope_flags)
374
374
profindex = profindex + 1
375
375
end subroutine get_flags
376
-
376
+
377
377
! > Traverse operating system tables to obtain number of profiles
378
378
subroutine traverse_oss_for_size (profile_name , compiler_name , os_list , table , profiles_size , error )
379
-
379
+
380
380
! > Name of profile
381
381
character (len= :), allocatable , intent (in ) :: profile_name
382
382
@@ -447,7 +447,7 @@ end subroutine traverse_oss_for_size
447
447
448
448
! > Traverse operating system tables to obtain profiles
449
449
subroutine traverse_oss (profile_name , compiler_name , os_list , table , profiles , profindex , error )
450
-
450
+
451
451
! > Name of profile
452
452
character (len= :), allocatable , intent (in ) :: profile_name
453
453
@@ -468,7 +468,7 @@ subroutine traverse_oss(profile_name, compiler_name, os_list, table, profiles, p
468
468
469
469
! > Index in the list of profiles
470
470
integer , intent (inout ) :: profindex
471
-
471
+
472
472
type (toml_key), allocatable :: key_list(:)
473
473
character (len= :), allocatable :: os_name, l_os_name
474
474
type (toml_table), pointer :: os_node
@@ -513,7 +513,7 @@ end subroutine traverse_oss
513
513
514
514
! > Traverse compiler tables
515
515
subroutine traverse_compilers (profile_name , comp_list , table , error , profiles_size , profiles , profindex )
516
-
516
+
517
517
! > Name of profile
518
518
character (len= :), allocatable , intent (in ) :: profile_name
519
519
@@ -522,10 +522,10 @@ subroutine traverse_compilers(profile_name, comp_list, table, error, profiles_si
522
522
523
523
! > Table containing compiler tables
524
524
type (toml_table), pointer , intent (in ) :: table
525
-
525
+
526
526
! > Error handling
527
527
type (error_t), allocatable , intent (out ) :: error
528
-
528
+
529
529
! > Number of profiles in list of profiles
530
530
integer , intent (inout ), optional :: profiles_size
531
531
@@ -534,8 +534,8 @@ subroutine traverse_compilers(profile_name, comp_list, table, error, profiles_si
534
534
535
535
! > Index in the list of profiles
536
536
integer , intent (inout ), optional :: profindex
537
-
538
- character (len= :), allocatable :: compiler_name
537
+
538
+ character (len= :), allocatable :: compiler_name
539
539
type (toml_table), pointer :: comp_node
540
540
type (toml_key), allocatable :: os_list(:)
541
541
integer :: icomp, stat
@@ -544,7 +544,7 @@ subroutine traverse_compilers(profile_name, comp_list, table, error, profiles_si
544
544
if (size (comp_list)<1 ) return
545
545
do icomp = 1 , size (comp_list)
546
546
call validate_compiler_name(comp_list(icomp)% key, is_valid)
547
- if (is_valid) then
547
+ if (is_valid) then
548
548
compiler_name = comp_list(icomp)% key
549
549
call get_value(table, compiler_name, comp_node, stat= stat)
550
550
if (stat /= toml_stat% success) then
@@ -567,7 +567,7 @@ subroutine traverse_compilers(profile_name, comp_list, table, error, profiles_si
567
567
else
568
568
call fatal_error(error,' *traverse_compilers*:Error: Compiler name not specified or invalid.' )
569
569
end if
570
- end do
570
+ end do
571
571
end subroutine traverse_compilers
572
572
573
573
! > Construct new profiles array from a TOML data structure
@@ -596,9 +596,9 @@ subroutine new_profiles(profiles, table, error)
596
596
default_profiles = get_default_profiles(error)
597
597
if (allocated (error)) return
598
598
call table% get_keys(prof_list)
599
-
599
+
600
600
if (size (prof_list) < 1 ) return
601
-
601
+
602
602
profiles_size = 0
603
603
604
604
do iprof = 1 , size (prof_list)
@@ -633,7 +633,7 @@ subroutine new_profiles(profiles, table, error)
633
633
634
634
profiles_size = profiles_size + size (default_profiles)
635
635
allocate (profiles(profiles_size))
636
-
636
+
637
637
do profindex= 1 , size (default_profiles)
638
638
profiles(profindex) = default_profiles(profindex)
639
639
end do
@@ -719,25 +719,25 @@ function get_default_profiles(error) result(default_profiles)
719
719
& ' ifort' , &
720
720
& OS_ALL, &
721
721
& flags = ' -fp-model precise -pc64 -align all -error-limit 1 -reentrancy&
722
- & threaded -nogen-interfaces -assume byterecl' , &
722
+ & threaded -nogen-interfaces -assume byterecl -standard-semantics ' , &
723
723
& is_built_in= .true. ), &
724
724
& new_profile(' release' , &
725
725
& ' ifort' , &
726
726
& OS_WINDOWS, &
727
727
& flags = ' /fp:precise /align:all /error-limit:1 /reentrancy:threaded&
728
- & /nogen-interfaces /assume:byterecl' , &
728
+ & /nogen-interfaces /assume:byterecl /standard-semantics ' , &
729
729
& is_built_in= .true. ), &
730
730
& new_profile(' release' , &
731
731
& ' ifx' , &
732
732
& OS_ALL, &
733
733
& flags = ' -fp-model=precise -pc64 -align all -error-limit 1 -reentrancy&
734
- & threaded -nogen-interfaces -assume byterecl' , &
734
+ & threaded -nogen-interfaces -assume byterecl -standard-semantics ' , &
735
735
& is_built_in= .true. ), &
736
736
& new_profile(' release' , &
737
737
& ' ifx' , &
738
738
& OS_WINDOWS, &
739
739
& flags = ' /fp:precise /align:all /error-limit:1 /reentrancy:threaded&
740
- & /nogen-interfaces /assume:byterecl' , &
740
+ & /nogen-interfaces /assume:byterecl /standard-semantics ' , &
741
741
& is_built_in= .true. ), &
742
742
& new_profile(' release' , &
743
743
&' nagfor' , &
@@ -775,28 +775,28 @@ function get_default_profiles(error) result(default_profiles)
775
775
& new_profile(' debug' , &
776
776
& ' ifort' , &
777
777
& OS_ALL, &
778
- & flags = ' -warn all -check all -error-limit 1 -O0 -g -assume byterecl -traceback' , &
778
+ & flags = ' -warn all -check all -error-limit 1 -O0 -g -assume byterecl -standard-semantics - traceback' , &
779
779
& is_built_in= .true. ), &
780
780
& new_profile(' debug' , &
781
781
& ' ifort' , &
782
782
& OS_WINDOWS, &
783
783
& flags = ' /warn:all /check:all /error-limit:1&
784
- & /Od /Z7 /assume:byterecl /traceback' , &
784
+ & /Od /Z7 /assume:byterecl /standard-semantics / traceback' , &
785
785
& is_built_in= .true. ), &
786
786
& new_profile(' debug' , &
787
787
& ' ifx' , &
788
788
& OS_ALL, &
789
- & flags = ' -warn all -check all -error-limit 1 -O0 -g -assume byterecl -traceback' , &
789
+ & flags = ' -warn all -check all -error-limit 1 -O0 -g -assume byterecl -standard-semantics - traceback' , &
790
790
& is_built_in= .true. ), &
791
791
& new_profile(' debug' , &
792
792
& ' ifx' , &
793
793
& OS_WINDOWS, &
794
- & flags = ' /warn:all /check:all /error-limit:1 /Od /Z7 /assume:byterecl' , &
794
+ & flags = ' /warn:all /check:all /error-limit:1 /Od /Z7 /assume:byterecl /standard-semantics ' , &
795
795
& is_built_in= .true. ), &
796
796
& new_profile(' debug' , &
797
797
& ' ifx' , &
798
798
& OS_WINDOWS, &
799
- & flags = ' /warn:all /check:all /error-limit:1 /Od /Z7 /assume:byterecl' , &
799
+ & flags = ' /warn:all /check:all /error-limit:1 /Od /Z7 /assume:byterecl /standard-semantics ' , &
800
800
& is_built_in= .true. ), &
801
801
& new_profile(' debug' , &
802
802
& ' lfortran' , &
0 commit comments