diff --git a/17-add-fortran-memory-align-investigation.patch b/17-add-fortran-memory-align-investigation.patch new file mode 100644 index 0000000000000000000000000000000000000000..cc620179db75f7dae717c4e900cad15d5edb094b --- /dev/null +++ b/17-add-fortran-memory-align-investigation.patch @@ -0,0 +1,1731 @@ +From affa7e06a123005fcdc782d6b540b067f50a36b3 Mon Sep 17 00:00:00 2001 +From: huwei3 +Date: Sun, 25 Dec 2022 19:05:34 +0800 +Subject: [PATCH] add-fortran-memory-align-investigation + + +diff --git a/test/fortran_align_examples/fortran-align-classic-flang1.f90 b/test/fortran_align_examples/fortran-align-classic-flang1.f90 +new file mode 100644 +index 0000000..2f8b716 +--- /dev/null ++++ b/test/fortran_align_examples/fortran-align-classic-flang1.f90 +@@ -0,0 +1,19 @@ ++program main ++ implicit none ++ logical(kind=1) :: a ++ logical(kind=2) :: b ++ logical(kind=4) :: c ++ logical(kind=8) :: d ++ print * , kind(a) ++ print * , kind(b) ++ print * , kind(c) ++ print * , kind(d) ++end program main ++ ++! Reference ++! https://github.com/flang-compiler/flang ++! ISO/IEC 1539-1:2010 Information technology — Programming languages ++! — Fortran — Part 1: Base language. ++! ISO/IEC 1539-1:2018 Information technology — Programming languages ++! — Fortran — Part 1: Base language. ++! ISO-IECJTC1-SC22-WG5_N2146_Fortran_2018_Draft_International_Standard_for_Ballot. +diff --git a/test/fortran_align_examples/fortran-align-classic-flang10.f90 b/test/fortran_align_examples/fortran-align-classic-flang10.f90 +new file mode 100644 +index 0000000..c9b1e2c +--- /dev/null ++++ b/test/fortran_align_examples/fortran-align-classic-flang10.f90 +@@ -0,0 +1,27 @@ ++program main ++ implicit none ++ real, dimension (:,:), allocatable :: darray ++ integer :: s1, s2 ++ integer :: i, j ++ print*, "Enter the size of the array:" ++ s1=2 ++ s2=2 ++ ! allocate memory ++ allocate ( darray(s1,s2) ) ++ ++ do i = 1, s1 ++ do j = 1, s2 ++ darray(i,j) = i*j ++ print*, "darray(",i,",",j,") = ", darray(i,j) ++ end do ++ end do ++ ++ write(*,*) 'addr darray(1,1)' , loc( darray(1,1) ) ++ write(*,*) 'addr darray(2,1)' , loc( darray(2,1) ) ++ write(*,*) 'addr darray(1,2)' , loc( darray(1,2) ) ++ write(*,*) 'addr darray(2,2)' , loc( darray(2,2) ) ++ deallocate (darray) ++end program main ++ ++! Reference ++! https://iowiki.com/fortran/fortran_dynamic_arrays.html +diff --git a/test/fortran_align_examples/fortran-align-classic-flang11.f90 b/test/fortran_align_examples/fortran-align-classic-flang11.f90 +new file mode 100644 +index 0000000..85e24f7 +--- /dev/null ++++ b/test/fortran_align_examples/fortran-align-classic-flang11.f90 +@@ -0,0 +1,24 @@ ++program ex0810 ++ implicit none ++ integer :: a, b ++ !Define a and b as the first and second variables in the global variables ++ common a, b ++ a=1 ++ b=2 ++ call ShowCommon() ++ write(*,*) , 'common begin a addr=', loc(a) ++ write(*,*) , 'common begin b addr=', loc(b) ++ stop ++end program ex0810 ++ ++subroutine ShowCommon() ++ implicit none ++ integer :: num1, num2 ++ !Define num1 and num2 as the first and second variables in the global variables ++ common num1, num2 ++ write(*,*) num1, num2 ++ return ++end subroutine ShowCommon ++ ++! Reference ++! 彭国伦,Fortran95程序设计[M]. 北京: 中国电力出版社, 2002: 169-170. +diff --git a/test/fortran_align_examples/fortran-align-classic-flang12.f90 b/test/fortran_align_examples/fortran-align-classic-flang12.f90 +new file mode 100644 +index 0000000..3c626c3 +--- /dev/null ++++ b/test/fortran_align_examples/fortran-align-classic-flang12.f90 +@@ -0,0 +1,26 @@ ++program main ++ implicit none ++ real, dimension (:,:), allocatable :: darray ++ integer :: s1, s2 ++ integer :: i, j ++ print*, "Enter the size of the array:" ++ s1=2 ++ s2=2 ++ allocate ( darray(s1,s2) ) ++ !dir$ assume_aligned darray:64 ++ do i = 1, s1 ++ do j = 1, s2 ++ darray(i,j) = i*j ++ print*, "darray(",i,",",j,") = ", darray(i,j) ++ end do ++ end do ++ ++ write(*,*) 'addr darray(1,1)' , loc( darray(1,1) ) ++ write(*,*) 'addr darray(2,1)' , loc( darray(2,1) ) ++ write(*,*) 'addr darray(1,2)' , loc( darray(1,2) ) ++ write(*,*) 'addr darray(2,2)' , loc( darray(2,2) ) ++ deallocate (darray) ++end program main ++ ++! Reference ++! https://iowiki.com/fortran/fortran_dynamic_arrays.html +diff --git a/test/fortran_align_examples/fortran-align-classic-flang13.f90 b/test/fortran_align_examples/fortran-align-classic-flang13.f90 +new file mode 100644 +index 0000000..07e492c +--- /dev/null ++++ b/test/fortran_align_examples/fortran-align-classic-flang13.f90 +@@ -0,0 +1,27 @@ ++program main ++ implicit none ++ real, dimension (:,:), allocatable :: darray ++ integer :: s1, s2 ++ integer :: i, j ++ print*, "Enter the size of the array:" ++ s1=2 ++ s2=2 ++ ! allocate memory ++ allocate ( darray(s1,s2) ) ++ !dir$ attributes align : 64 : darray ++ do i = 1, s1 ++ do j = 1, s2 ++ darray(i,j) = i*j ++ print*, "darray(",i,",",j,") = ", darray(i,j) ++ end do ++ end do ++ ++ write(*,*) 'addr darray(1,1)' , loc( darray(1,1) ) ++ write(*,*) 'addr darray(2,1)' , loc( darray(2,1) ) ++ write(*,*) 'addr darray(1,2)' , loc( darray(1,2) ) ++ write(*,*) 'addr darray(2,2)' , loc( darray(2,2) ) ++ deallocate (darray) ++end program main ++ ++! Reference ++! https://iowiki.com/fortran/fortran_dynamic_arrays.html +diff --git a/test/fortran_align_examples/fortran-align-classic-flang2.f90 b/test/fortran_align_examples/fortran-align-classic-flang2.f90 +new file mode 100644 +index 0000000..6b25778 +--- /dev/null ++++ b/test/fortran_align_examples/fortran-align-classic-flang2.f90 +@@ -0,0 +1,15 @@ ++program main ++ implicit none ++ character(kind=1) :: a ++ character(kind=2) :: b ++ print * , kind(a) ++ print * , kind(b) ++end program main ++ ++! Reference ++! https://github.com/flang-compiler/flang ++! ISO/IEC 1539-1:2010 Information technology — Programming languages ++! — Fortran — Part 1: Base language. ++! ISO/IEC 1539-1:2018 Information technology — Programming languages ++! — Fortran — Part 1: Base language. ++! ISO-IECJTC1-SC22-WG5_N2146_Fortran_2018_Draft_International_Standard_for_Ballot. +diff --git a/test/fortran_align_examples/fortran-align-classic-flang3.f90 b/test/fortran_align_examples/fortran-align-classic-flang3.f90 +new file mode 100644 +index 0000000..d61fb74 +--- /dev/null ++++ b/test/fortran_align_examples/fortran-align-classic-flang3.f90 +@@ -0,0 +1,19 @@ ++program main ++ implicit none ++ integer(kind=1) :: a ++ integer(kind=2) :: b ++ integer(kind=4) :: c ++ integer(kind=8) :: d ++ print * , kind(a) ++ print * , kind(b) ++ print * , kind(c) ++ print * , kind(d) ++end program main ++ ++! Reference ++! https://github.com/flang-compiler/flang ++! ISO/IEC 1539-1:2010 Information technology — Programming languages ++! — Fortran — Part 1: Base language. ++! ISO/IEC 1539-1:2018 Information technology — Programming languages ++! — Fortran — Part 1: Base language. ++! ISO-IECJTC1-SC22-WG5_N2146_Fortran_2018_Draft_International_Standard_for_Ballot. +diff --git a/test/fortran_align_examples/fortran-align-classic-flang4.f90 b/test/fortran_align_examples/fortran-align-classic-flang4.f90 +new file mode 100644 +index 0000000..cd5ddc6 +--- /dev/null ++++ b/test/fortran_align_examples/fortran-align-classic-flang4.f90 +@@ -0,0 +1,15 @@ ++program main ++ implicit none ++ real(kind=4) :: c ++ real(kind=8) :: d ++ print * , kind(c) ++ print * , kind(d) ++end program main ++ ++! Reference ++! https://github.com/flang-compiler/flang ++! ISO/IEC 1539-1:2010 Information technology — Programming languages ++! — Fortran — Part 1: Base language. ++! ISO/IEC 1539-1:2018 Information technology — Programming languages ++! — Fortran — Part 1: Base language. ++! ISO-IECJTC1-SC22-WG5_N2146_Fortran_2018_Draft_International_Standard_for_Ballot. +diff --git a/test/fortran_align_examples/fortran-align-classic-flang5.f90 b/test/fortran_align_examples/fortran-align-classic-flang5.f90 +new file mode 100644 +index 0000000..968ae51 +--- /dev/null ++++ b/test/fortran_align_examples/fortran-align-classic-flang5.f90 +@@ -0,0 +1,15 @@ ++program main ++ implicit none ++ complex(kind=4) :: c ++ complex(kind=8) :: d ++ print * , kind(c) ++ print * , kind(d) ++end program main ++ ++! Reference ++! https://github.com/flang-compiler/flang ++! ISO/IEC 1539-1:2010 Information technology — Programming languages ++! — Fortran — Part 1: Base language. ++! ISO/IEC 1539-1:2018 Information technology — Programming languages ++! — Fortran — Part 1: Base language. ++! ISO-IECJTC1-SC22-WG5_N2146_Fortran_2018_Draft_International_Standard_for_Ballot. +diff --git a/test/fortran_align_examples/fortran-align-classic-flang6.f90 b/test/fortran_align_examples/fortran-align-classic-flang6.f90 +new file mode 100644 +index 0000000..9861c35 +--- /dev/null ++++ b/test/fortran_align_examples/fortran-align-classic-flang6.f90 +@@ -0,0 +1,16 @@ ++program main ++ implicit none ++ !modify kine ++ integer(kind=4) :: test(1000) ++ write (*,*) 'location test=', loc(test) ++ write (*,*) 'location test[1]=', loc(test(1)) ++ write (*,*) 'location test[2]=', loc(test(2)) ++end program main ++ ++! Reference ++! https://github.com/flang-compiler/flang ++! ISO/IEC 1539-1:2010 Information technology — Programming languages ++! — Fortran — Part 1: Base language. ++! ISO/IEC 1539-1:2018 Information technology — Programming languages ++! — Fortran — Part 1: Base language. ++! ISO-IECJTC1-SC22-WG5_N2146_Fortran_2018_Draft_International_Standard_for_Ballot. +diff --git a/test/fortran_align_examples/fortran-align-classic-flang7.f90 b/test/fortran_align_examples/fortran-align-classic-flang7.f90 +new file mode 100644 +index 0000000..0c8bef5 +--- /dev/null ++++ b/test/fortran_align_examples/fortran-align-classic-flang7.f90 +@@ -0,0 +1,20 @@ ++program main ++ implicit none ++ type demo ++ integer(kind=4) :: a(3) ++ real(kind=4) :: b ++ logical(kind=1) :: c ++ end type ++ type(demo) :: test ++ write (*,*) 'location c=', loc(test%c) ++ write (*,*) 'location b=', loc(test%b) ++ write (*,*) 'location a=', loc(test%a) ++end program main ++ ++! Reference ++! https://github.com/flang-compiler/flang ++! ISO/IEC 1539-1:2010 Information technology — Programming languages ++! — Fortran — Part 1: Base language. ++! ISO/IEC 1539-1:2018 Information technology — Programming languages ++! — Fortran — Part 1: Base language. ++! ISO-IECJTC1-SC22-WG5_N2146_Fortran_2018_Draft_International_Standard_for_Ballot. +diff --git a/test/fortran_align_examples/fortran-align-classic-flang8.f90 b/test/fortran_align_examples/fortran-align-classic-flang8.f90 +new file mode 100644 +index 0000000..b9df3b6 +--- /dev/null ++++ b/test/fortran_align_examples/fortran-align-classic-flang8.f90 +@@ -0,0 +1,23 @@ ++program main ++ call one() ++ call two() ++ write( *, *), 'subroutine-one-addr=', loc(one) ++ write( *, *) , 'subroutine-two-addr=', loc(two) ++end program main ++ ++subroutine one() ++ integer :: a=3 ++ print * , a ++end subroutine one ++ ++subroutine two() ++ print * , 'two' ++end subroutine two ++ ++! Reference ++! https://github.com/flang-compiler/flang ++! ISO/IEC 1539-1:2010 Information technology — Programming languages ++! — Fortran — Part 1: Base language. ++! ISO/IEC 1539-1:2018 Information technology — Programming languages ++! — Fortran — Part 1: Base language. ++! ISO-IECJTC1-SC22-WG5_N2146_Fortran_2018_Draft_International_Standard_for_Ballot. +diff --git a/test/fortran_align_examples/fortran-align-classic-flang9.f90 b/test/fortran_align_examples/fortran-align-classic-flang9.f90 +new file mode 100644 +index 0000000..116b419 +--- /dev/null ++++ b/test/fortran_align_examples/fortran-align-classic-flang9.f90 +@@ -0,0 +1,32 @@ ++program main ++ integer(kind=4) :: a=2 ++ integer(kind=4) :: b=3 ++ integer(kind=4) :: c ++ integer(kind=4) :: d ++ write(*,*) myadd(a,b) ++ write(*,*) mymuli(a,b) ++ write( *, *), 'function-myadd-addr=', loc(myadd) ++ write( *, *) , 'function-mymuli-addr=', loc(testadd) ++end program main ++ ++function myadd(first, second) ++ integer(kind=4):: first , second ++ integer(kind=4):: myadd ++ myadd= first + second ++ return ++end function myadd ++ ++function mymuli(first , second) ++ integer(kind=4):: first , second ++ integer(kind=4):: mymuli ++ mymuli= first*second ++ return ++end function mymuli ++ ++! Reference ++! https://github.com/flang-compiler/flang ++! ISO/IEC 1539-1:2010 Information technology — Programming languages ++! — Fortran — Part 1: Base language. ++! ISO/IEC 1539-1:2018 Information technology — Programming languages ++! — Fortran — Part 1: Base language. ++! ISO-IECJTC1-SC22-WG5_N2146_Fortran_2018_Draft_International_Standard_for_Ballot. +diff --git a/test/fortran_align_examples/fortran-align-gfortran1.f90 b/test/fortran_align_examples/fortran-align-gfortran1.f90 +new file mode 100644 +index 0000000..e42b466 +--- /dev/null ++++ b/test/fortran_align_examples/fortran-align-gfortran1.f90 +@@ -0,0 +1,21 @@ ++program main ++ implicit none ++ logical(kind=1) :: a ++ logical(kind=2) :: b ++ logical(kind=4) :: c ++ logical(kind=8) :: d ++ logical(kind=16) :: e ++ print * , kind(a) ++ print * , kind(b) ++ print * , kind(c) ++ print * , kind(d) ++ print * , kind(e) ++end program main ++ ++! Reference ++! Using GNU Fortran , For gcc version 10.4.0 ++! ISO/IEC 1539-1:2010 Information technology — Programming languages ++! — Fortran — Part 1: Base language. ++! ISO/IEC 1539-1:2018 Information technology — Programming languages ++! — Fortran — Part 1: Base language. ++! ISO-IECJTC1-SC22-WG5_N2146_Fortran_2018_Draft_International_Standard_for_Ballot. +diff --git a/test/fortran_align_examples/fortran-align-gfortran10.f90 b/test/fortran_align_examples/fortran-align-gfortran10.f90 +new file mode 100644 +index 0000000..0b702cc +--- /dev/null ++++ b/test/fortran_align_examples/fortran-align-gfortran10.f90 +@@ -0,0 +1,31 @@ ++program main ++ integer(kind=4) :: a=2 ++ integer(kind=4) :: b=3 ++ integer(kind=4) :: c ++ integer(kind=4) :: d ++ write(*,*) myadd(a,b) ++ write(*,*) mymuli(a,b) ++ write( *, *), 'function-myadd-addr=', loc(myadd) ++ write( *, *) , 'function-mymuli-addr=', loc(testadd) ++end program main ++ ++function myadd(first, second) ++ integer(kind=4):: first , second ++ integer(kind=4):: myadd ++ myadd= first + second ++ return ++end function myadd ++ ++function mymuli(first , second) ++ integer(kind=4):: first , second ++ integer(kind=4):: mymuli ++ mymuli= first*second ++ return ++end function mymuli ++! Reference ++! Using GNU Fortran , For gcc version 10.4.0 ++! ISO/IEC 1539-1:2010 Information technology — Programming languages ++! — Fortran — Part 1: Base language. ++! ISO/IEC 1539-1:2018 Information technology — Programming languages ++! — Fortran — Part 1: Base language. ++! ISO-IECJTC1-SC22-WG5_N2146_Fortran_2018_Draft_International_Standard_for_Ballot. +diff --git a/test/fortran_align_examples/fortran-align-gfortran11.f90 b/test/fortran_align_examples/fortran-align-gfortran11.f90 +new file mode 100644 +index 0000000..2388f6a +--- /dev/null ++++ b/test/fortran_align_examples/fortran-align-gfortran11.f90 +@@ -0,0 +1,28 @@ ++program main ++ implicit none ++ real, dimension (:,:), allocatable :: darray ++ integer :: s1, s2 ++ integer :: i, j ++ print*, "Enter the size of the array:" ++ s1=2 ++ s2=2 ++ ! allocate memory ++ allocate ( darray(s1,s2) ) ++ ++ do i = 1, s1 ++ do j = 1, s2 ++ darray(i,j) = i*j ++ print*, "darray(",i,",",j,") = ", darray(i,j) ++ end do ++ end do ++ ++ write(*,*) 'addr darray(1,1)' , loc( darray(1,1) ) ++ write(*,*) 'addr darray(2,1)' , loc( darray(2,1) ) ++ write(*,*) 'addr darray(1,2)' , loc( darray(1,2) ) ++ write(*,*) 'addr darray(2,2)' , loc( darray(2,2) ) ++ deallocate (darray) ++end program main ++ ++ ++! Reference ++! https://iowiki.com/fortran/fortran_dynamic_arrays.html +diff --git a/test/fortran_align_examples/fortran-align-gfortran12.f90 b/test/fortran_align_examples/fortran-align-gfortran12.f90 +new file mode 100644 +index 0000000..6a43ea0 +--- /dev/null ++++ b/test/fortran_align_examples/fortran-align-gfortran12.f90 +@@ -0,0 +1,24 @@ ++program ex0810 ++ implicit none ++ integer :: a, b ++ common a, b ++ a=1 ++ b=2 ++ call ShowCommon() ++ write(*,*) , 'common begin a addr=', loc(a) ++ write(*,*) , 'common begin b addr=', loc(b) ++ ++ stop ++ ++end program ex0810 ++ ++subroutine ShowCommon() ++ implicit none ++ integer :: num1, num2 ++ common num1, num2 ++ write(*,*) num1, num2 ++ return ++ ++end subroutine ShowCommon ++! Reference ++! 彭国伦,Fortran95程序设计[M]. 北京: 中国电力出版社, 2002: 169-170. +diff --git a/test/fortran_align_examples/fortran-align-gfortran13.f90 b/test/fortran_align_examples/fortran-align-gfortran13.f90 +new file mode 100644 +index 0000000..ffe1f64 +--- /dev/null ++++ b/test/fortran_align_examples/fortran-align-gfortran13.f90 +@@ -0,0 +1,14 @@ ++program main ++ implicit none ++ character(kind=1) ::a ++ integer(kind=8) :: b ++ common a, b ++ a='a' ++ b=2 ++ write(*,*) , 'common begin a addr=', loc(a) ++ write(*,*) , 'common begin b addr=', loc(b) ++ ++end program main ++ ++! Reference ++! 彭国伦,Fortran95程序设计[M]. 北京: 中国电力出版社, 2002: 169-170. +diff --git a/test/fortran_align_examples/fortran-align-gfortran2.f90 b/test/fortran_align_examples/fortran-align-gfortran2.f90 +new file mode 100644 +index 0000000..787c7ba +--- /dev/null ++++ b/test/fortran_align_examples/fortran-align-gfortran2.f90 +@@ -0,0 +1,12 @@ ++program main ++ implicit none ++ character(kind=1) :: a ++ print * , kind(a) ++end program main ++! Reference ++! Using GNU Fortran , For gcc version 10.4.0 ++! ISO/IEC 1539-1:2010 Information technology — Programming languages ++! — Fortran — Part 1: Base language. ++! ISO/IEC 1539-1:2018 Information technology — Programming languages ++! — Fortran — Part 1: Base language. ++! ISO-IECJTC1-SC22-WG5_N2146_Fortran_2018_Draft_International_Standard_for_Ballot. +diff --git a/test/fortran_align_examples/fortran-align-gfortran3.f90 b/test/fortran_align_examples/fortran-align-gfortran3.f90 +new file mode 100644 +index 0000000..e55e06d +--- /dev/null ++++ b/test/fortran_align_examples/fortran-align-gfortran3.f90 +@@ -0,0 +1,20 @@ ++program main ++ implicit none ++ integer(kind=1) :: a ++ integer(kind=2) :: b ++ integer(kind=4) :: c ++ integer(kind=8) :: d ++ integer(kind=16) :: e ++ print * , kind(a) ++ print * , kind(b) ++ print * , kind(c) ++ print * , kind(d) ++ print * , kind(e) ++end program main ++! Reference ++! Using GNU Fortran , For gcc version 10.4.0 ++! ISO/IEC 1539-1:2010 Information technology — Programming languages ++! — Fortran — Part 1: Base language. ++! ISO/IEC 1539-1:2018 Information technology — Programming languages ++! — Fortran — Part 1: Base language. ++! ISO-IECJTC1-SC22-WG5_N2146_Fortran_2018_Draft_International_Standard_for_Ballot. +diff --git a/test/fortran_align_examples/fortran-align-gfortran4.f90 b/test/fortran_align_examples/fortran-align-gfortran4.f90 +new file mode 100644 +index 0000000..c902d2c +--- /dev/null ++++ b/test/fortran_align_examples/fortran-align-gfortran4.f90 +@@ -0,0 +1,20 @@ ++program main ++ integer(kind=1) :: a ++ integer(kind=2) :: b ++ integer(kind=4) :: c ++ integer(kind=8) :: d ++ ++ write (*,*) 'location a=', loc(a) ++ write (*,*) 'location b=', loc(b) ++ write (*,*) 'location c=', loc(c) ++ write (*,*) 'location d=', loc(d) ++end program main ++ ++ ++! Reference ++! Using GNU Fortran , For gcc version 10.4.0 ++! ISO/IEC 1539-1:2010 Information technology — Programming languages ++! — Fortran — Part 1: Base language. ++! ISO/IEC 1539-1:2018 Information technology — Programming languages ++! — Fortran — Part 1: Base language. ++! ISO-IECJTC1-SC22-WG5_N2146_Fortran_2018_Draft_International_Standard_for_Ballot. +diff --git a/test/fortran_align_examples/fortran-align-gfortran5.f90 b/test/fortran_align_examples/fortran-align-gfortran5.f90 +new file mode 100644 +index 0000000..66d5988 +--- /dev/null ++++ b/test/fortran_align_examples/fortran-align-gfortran5.f90 +@@ -0,0 +1,16 @@ ++program main ++ implicit none ++ real(kind=4) :: c ++ real(kind=8) :: d ++ real(kind=16) :: e ++ print * , kind(c) ++ print * , kind(d) ++ print * , kind(e) ++end program main ++! Reference ++! Using GNU Fortran , For gcc version 10.4.0 ++! ISO/IEC 1539-1:2010 Information technology — Programming languages ++! — Fortran — Part 1: Base language. ++! ISO/IEC 1539-1:2018 Information technology — Programming languages ++! — Fortran — Part 1: Base language. ++! ISO-IECJTC1-SC22-WG5_N2146_Fortran_2018_Draft_International_Standard_for_Ballot. +diff --git a/test/fortran_align_examples/fortran-align-gfortran6.f90 b/test/fortran_align_examples/fortran-align-gfortran6.f90 +new file mode 100644 +index 0000000..7fc8c47 +--- /dev/null ++++ b/test/fortran_align_examples/fortran-align-gfortran6.f90 +@@ -0,0 +1,18 @@ ++program main ++ implicit none ++ complex(kind=4) :: c ++ complex(kind=8) :: d ++ complex(kind=16) :: e ++ print * , kind(c) ++ print * , kind(d) ++ print * , kind(e) ++end program main ++ ++ ++! Reference ++! Using GNU Fortran , For gcc version 10.4.0 ++! ISO/IEC 1539-1:2010 Information technology — Programming languages ++! — Fortran — Part 1: Base language. ++! ISO/IEC 1539-1:2018 Information technology — Programming languages ++! — Fortran — Part 1: Base language. ++! ISO-IECJTC1-SC22-WG5_N2146_Fortran_2018_Draft_International_Standard_for_Ballot. +diff --git a/test/fortran_align_examples/fortran-align-gfortran7.f90 b/test/fortran_align_examples/fortran-align-gfortran7.f90 +new file mode 100644 +index 0000000..ed34923 +--- /dev/null ++++ b/test/fortran_align_examples/fortran-align-gfortran7.f90 +@@ -0,0 +1,14 @@ ++program main ++ implicit none ++ integer(kind=4) :: test(1000) ++ write (*,*) 'location test=', loc(test) ++ write (*,*) 'location test[1]=', loc(test(1)) ++ write (*,*) 'location test[2]=', loc(test(2)) ++end program main ++! Reference ++! Using GNU Fortran , For gcc version 10.4.0 ++! ISO/IEC 1539-1:2010 Information technology — Programming languages ++! — Fortran — Part 1: Base language. ++! ISO/IEC 1539-1:2018 Information technology — Programming languages ++! — Fortran — Part 1: Base language. ++! ISO-IECJTC1-SC22-WG5_N2146_Fortran_2018_Draft_International_Standard_for_Ballot. +diff --git a/test/fortran_align_examples/fortran-align-gfortran8.f90 b/test/fortran_align_examples/fortran-align-gfortran8.f90 +new file mode 100644 +index 0000000..6fd62c8 +--- /dev/null ++++ b/test/fortran_align_examples/fortran-align-gfortran8.f90 +@@ -0,0 +1,19 @@ ++program main ++ implicit none ++ type demo ++ integer(kind=4) :: a(3) ++ real(kind=4) :: b ++ logical(kind=1) :: c ++ end type ++ type(demo) :: test ++ write (*,*) 'location c=', loc(test%c) ++ write (*,*) 'location b=', loc(test%b) ++ write (*,*) 'location a=', loc(test%a) ++end program main ++! Reference ++! Using GNU Fortran , For gcc version 10.4.0 ++! ISO/IEC 1539-1:2010 Information technology — Programming languages ++! — Fortran — Part 1: Base language. ++! ISO/IEC 1539-1:2018 Information technology — Programming languages ++! — Fortran — Part 1: Base language. ++! ISO-IECJTC1-SC22-WG5_N2146_Fortran_2018_Draft_International_Standard_for_Ballot. +diff --git a/test/fortran_align_examples/fortran-align-gfortran9.f90 b/test/fortran_align_examples/fortran-align-gfortran9.f90 +new file mode 100644 +index 0000000..6ff8b2f +--- /dev/null ++++ b/test/fortran_align_examples/fortran-align-gfortran9.f90 +@@ -0,0 +1,23 @@ ++program main ++ call one() ++ call two() ++ write( *, *), 'subroutine-one-addr=', loc(one) ++ write( *, *) , 'subroutine-two-addr=', loc(two) ++ ++end program main ++ ++subroutine one() ++ integer :: a=3 ++ print * , a ++end subroutine one ++ ++subroutine two() ++ print * , 'two' ++end subroutine two ++! Reference ++! Using GNU Fortran , For gcc version 10.4.0 ++! ISO/IEC 1539-1:2010 Information technology — Programming languages ++! — Fortran — Part 1: Base language. ++! ISO/IEC 1539-1:2018 Information technology — Programming languages ++! — Fortran — Part 1: Base language. ++! ISO-IECJTC1-SC22-WG5_N2146_Fortran_2018_Draft_International_Standard_for_Ballot. +diff --git a/test/fortran_align_examples/fortran-align-ifort1.f90 b/test/fortran_align_examples/fortran-align-ifort1.f90 +new file mode 100644 +index 0000000..1298b36 +--- /dev/null ++++ b/test/fortran_align_examples/fortran-align-ifort1.f90 +@@ -0,0 +1,20 @@ ++program main ++ implicit none ++ logical(kind=1) :: a ++ logical(kind=2) :: b ++ logical(kind=4) :: c ++ logical(kind=8) :: d ++ print * , kind(a) ++ print * , kind(b) ++ print * , kind(c) ++ print * , kind(d) ++ ++end program main ++ ++! Reference ++! Intel® Fortran Compiler Classic and Intel® Fortran Compiler Developer Guide and Reference. ++! ISO/IEC 1539-1:2010 Information technology — Programming languages ++! — Fortran — Part 1: Base language. ++! ISO/IEC 1539-1:2018 Information technology — Programming languages ++! — Fortran — Part 1: Base language. ++! ISO-IECJTC1-SC22-WG5_N2146_Fortran_2018_Draft_International_Standard_for_Ballot. +diff --git a/test/fortran_align_examples/fortran-align-ifort10.f90 b/test/fortran_align_examples/fortran-align-ifort10.f90 +new file mode 100644 +index 0000000..c5e65a3 +--- /dev/null ++++ b/test/fortran_align_examples/fortran-align-ifort10.f90 +@@ -0,0 +1,23 @@ ++program main ++ call one() ++ call two() ++ write( *, *), 'subroutine-one-addr=', loc(one) ++ write( *, *) , 'subroutine-two-addr=', loc(two) ++ ++end program main ++ ++subroutine one() ++ integer :: a=3 ++ print * , a ++end subroutine one ++ ++subroutine two() ++ print * , 'two' ++end subroutine two ++! Reference ++! Intel® Fortran Compiler Classic and Intel® Fortran Compiler Developer Guide and Reference. ++! ISO/IEC 1539-1:2010 Information technology — Programming languages ++! — Fortran — Part 1: Base language. ++! ISO/IEC 1539-1:2018 Information technology — Programming languages ++! — Fortran — Part 1: Base language. ++! ISO-IECJTC1-SC22-WG5_N2146_Fortran_2018_Draft_International_Standard_for_Ballot. +diff --git a/test/fortran_align_examples/fortran-align-ifort11.f90 b/test/fortran_align_examples/fortran-align-ifort11.f90 +new file mode 100644 +index 0000000..c9b1e2c +--- /dev/null ++++ b/test/fortran_align_examples/fortran-align-ifort11.f90 +@@ -0,0 +1,27 @@ ++program main ++ implicit none ++ real, dimension (:,:), allocatable :: darray ++ integer :: s1, s2 ++ integer :: i, j ++ print*, "Enter the size of the array:" ++ s1=2 ++ s2=2 ++ ! allocate memory ++ allocate ( darray(s1,s2) ) ++ ++ do i = 1, s1 ++ do j = 1, s2 ++ darray(i,j) = i*j ++ print*, "darray(",i,",",j,") = ", darray(i,j) ++ end do ++ end do ++ ++ write(*,*) 'addr darray(1,1)' , loc( darray(1,1) ) ++ write(*,*) 'addr darray(2,1)' , loc( darray(2,1) ) ++ write(*,*) 'addr darray(1,2)' , loc( darray(1,2) ) ++ write(*,*) 'addr darray(2,2)' , loc( darray(2,2) ) ++ deallocate (darray) ++end program main ++ ++! Reference ++! https://iowiki.com/fortran/fortran_dynamic_arrays.html +diff --git a/test/fortran_align_examples/fortran-align-ifort12.f90 b/test/fortran_align_examples/fortran-align-ifort12.f90 +new file mode 100644 +index 0000000..7baf338 +--- /dev/null ++++ b/test/fortran_align_examples/fortran-align-ifort12.f90 +@@ -0,0 +1,24 @@ ++program ex0810 ++ implicit none ++ integer :: a, b ++ common a, b ++ a=1 ++ b=2 ++ call ShowCommon() ++ write(*,*) , 'common begin a addr=', loc(a) ++ write(*,*) , 'common begin b addr=', loc(b) ++ ++ stop ++ ++end program ex0810 ++ ++subroutine ShowCommon() ++ implicit none ++ integer :: num1, num2 ++ common num1, num2 ++ write(*,*) num1, num2 ++ return ++ ++end subroutine ShowCommon ++! Reference ++! 彭国伦,Fortran95程序设计[M]. 北京: 中国电力出版社, 2002: 169-170. +diff --git a/test/fortran_align_examples/fortran-align-ifort13.f90 b/test/fortran_align_examples/fortran-align-ifort13.f90 +new file mode 100644 +index 0000000..44fca4f +--- /dev/null ++++ b/test/fortran_align_examples/fortran-align-ifort13.f90 +@@ -0,0 +1,19 @@ ++program main ++ type demo ++ integer(kind=8) :: a(3) ++ logical(kind=1) :: c ++ real(kind=8) :: b ++ end type ++ type(demo) :: test ++ write (*,*) 'location c=', loc(test%c) ++ write (*,*) 'location b=', loc(test%b) ++ write (*,*) 'location a=', loc(test%a) ++end program main ++ ++! Reference ++! Intel® Fortran Compiler Classic and Intel® Fortran Compiler Developer Guide and Reference. ++! ISO/IEC 1539-1:2010 Information technology — Programming languages ++! — Fortran — Part 1: Base language. ++! ISO/IEC 1539-1:2018 Information technology — Programming languages ++! — Fortran — Part 1: Base language. ++! ISO-IECJTC1-SC22-WG5_N2146_Fortran_2018_Draft_International_Standard_for_Ballot. +diff --git a/test/fortran_align_examples/fortran-align-ifort14.f90 b/test/fortran_align_examples/fortran-align-ifort14.f90 +new file mode 100644 +index 0000000..d5ea141 +--- /dev/null ++++ b/test/fortran_align_examples/fortran-align-ifort14.f90 +@@ -0,0 +1,14 @@ ++program main ++ integer(4) :: test(1000) ++ write (*,*) 'location test=', loc(test) ++ write (*,*) 'location test[1]=', loc(test(1)) ++ write (*,*) 'location test[2]=', loc(test(2)) ++end program main ++ ++! Reference ++! Intel® Fortran Compiler Classic and Intel® Fortran Compiler Developer Guide and Reference. ++! ISO/IEC 1539-1:2010 Information technology — Programming languages ++! — Fortran — Part 1: Base language. ++! ISO/IEC 1539-1:2018 Information technology — Programming languages ++! — Fortran — Part 1: Base language. ++! ISO-IECJTC1-SC22-WG5_N2146_Fortran_2018_Draft_International_Standard_for_Ballot. +diff --git a/test/fortran_align_examples/fortran-align-ifort15.f90 b/test/fortran_align_examples/fortran-align-ifort15.f90 +new file mode 100644 +index 0000000..ac5edc1 +--- /dev/null ++++ b/test/fortran_align_examples/fortran-align-ifort15.f90 +@@ -0,0 +1,14 @@ ++program main ++ implicit none ++ character(kind=1) ::a ++ integer(kind=8) :: b ++ common a, b ++ a='a' ++ b=2 ++ write(*,*) , 'common begin a addr=', loc(a) ++ write(*,*) , 'common begin b addr=', loc(b) ++ ++end program main ++ ++! Reference ++! 彭国伦,Fortran95程序设计[M]. 北京: 中国电力出版社, 2002: 169-170. +diff --git a/test/fortran_align_examples/fortran-align-ifort16.f90 b/test/fortran_align_examples/fortran-align-ifort16.f90 +new file mode 100644 +index 0000000..6b2fcea +--- /dev/null ++++ b/test/fortran_align_examples/fortran-align-ifort16.f90 +@@ -0,0 +1,20 @@ ++program main ++ implicit none ++ type demo ++ logical(kind=1) :: c ++ real(kind=4) :: b ++ integer(kind=8) :: a(3) ++ end type ++ type(demo) :: test ++ write (*,*) 'location c=', loc(test%c) ++ write (*,*) 'location b=', loc(test%b) ++ write (*,*) 'location a=', loc(test%a) ++end program main ++ ++! Reference ++! Intel® Fortran Compiler Classic and Intel® Fortran Compiler Developer Guide and Reference. ++! ISO/IEC 1539-1:2010 Information technology — Programming languages ++! — Fortran — Part 1: Base language. ++! ISO/IEC 1539-1:2018 Information technology — Programming languages ++! — Fortran — Part 1: Base language. ++! ISO-IECJTC1-SC22-WG5_N2146_Fortran_2018_Draft_International_Standard_for_Ballot. +diff --git a/test/fortran_align_examples/fortran-align-ifort17.f90 b/test/fortran_align_examples/fortran-align-ifort17.f90 +new file mode 100644 +index 0000000..6b2fcea +--- /dev/null ++++ b/test/fortran_align_examples/fortran-align-ifort17.f90 +@@ -0,0 +1,20 @@ ++program main ++ implicit none ++ type demo ++ logical(kind=1) :: c ++ real(kind=4) :: b ++ integer(kind=8) :: a(3) ++ end type ++ type(demo) :: test ++ write (*,*) 'location c=', loc(test%c) ++ write (*,*) 'location b=', loc(test%b) ++ write (*,*) 'location a=', loc(test%a) ++end program main ++ ++! Reference ++! Intel® Fortran Compiler Classic and Intel® Fortran Compiler Developer Guide and Reference. ++! ISO/IEC 1539-1:2010 Information technology — Programming languages ++! — Fortran — Part 1: Base language. ++! ISO/IEC 1539-1:2018 Information technology — Programming languages ++! — Fortran — Part 1: Base language. ++! ISO-IECJTC1-SC22-WG5_N2146_Fortran_2018_Draft_International_Standard_for_Ballot. +diff --git a/test/fortran_align_examples/fortran-align-ifort18.f90 b/test/fortran_align_examples/fortran-align-ifort18.f90 +new file mode 100644 +index 0000000..4d97967 +--- /dev/null ++++ b/test/fortran_align_examples/fortran-align-ifort18.f90 +@@ -0,0 +1,19 @@ ++program main ++ type :: demo ++ sequence ++ character(kind=1) :: a ++ integer(kind=8) :: b ++ end type ++ type(demo) :: test ++ write (*,*) 'location a=', loc(test%a) ++ write (*,*) 'location b=', loc(test%b) ++end program main ++ ++ ++! Reference ++! Intel® Fortran Compiler Classic and Intel® Fortran Compiler Developer Guide and Reference. ++! ISO/IEC 1539-1:2010 Information technology — Programming languages ++! — Fortran — Part 1: Base language. ++! ISO/IEC 1539-1:2018 Information technology — Programming languages ++! — Fortran — Part 1: Base language. ++! ISO-IECJTC1-SC22-WG5_N2146_Fortran_2018_Draft_International_Standard_for_Ballot. +diff --git a/test/fortran_align_examples/fortran-align-ifort19.f90 b/test/fortran_align_examples/fortran-align-ifort19.f90 +new file mode 100644 +index 0000000..c9b1e2c +--- /dev/null ++++ b/test/fortran_align_examples/fortran-align-ifort19.f90 +@@ -0,0 +1,27 @@ ++program main ++ implicit none ++ real, dimension (:,:), allocatable :: darray ++ integer :: s1, s2 ++ integer :: i, j ++ print*, "Enter the size of the array:" ++ s1=2 ++ s2=2 ++ ! allocate memory ++ allocate ( darray(s1,s2) ) ++ ++ do i = 1, s1 ++ do j = 1, s2 ++ darray(i,j) = i*j ++ print*, "darray(",i,",",j,") = ", darray(i,j) ++ end do ++ end do ++ ++ write(*,*) 'addr darray(1,1)' , loc( darray(1,1) ) ++ write(*,*) 'addr darray(2,1)' , loc( darray(2,1) ) ++ write(*,*) 'addr darray(1,2)' , loc( darray(1,2) ) ++ write(*,*) 'addr darray(2,2)' , loc( darray(2,2) ) ++ deallocate (darray) ++end program main ++ ++! Reference ++! https://iowiki.com/fortran/fortran_dynamic_arrays.html +diff --git a/test/fortran_align_examples/fortran-align-ifort2.f90 b/test/fortran_align_examples/fortran-align-ifort2.f90 +new file mode 100644 +index 0000000..2def020 +--- /dev/null ++++ b/test/fortran_align_examples/fortran-align-ifort2.f90 +@@ -0,0 +1,13 @@ ++program main ++ implicit none ++ character(kind=1) :: a ++ print * , kind(a) ++ ++end program main ++! Reference ++! Intel® Fortran Compiler Classic and Intel® Fortran Compiler Developer Guide and Reference. ++! ISO/IEC 1539-1:2010 Information technology — Programming languages ++! — Fortran — Part 1: Base language. ++! ISO/IEC 1539-1:2018 Information technology — Programming languages ++! — Fortran — Part 1: Base language. ++! ISO-IECJTC1-SC22-WG5_N2146_Fortran_2018_Draft_International_Standard_for_Ballot. +diff --git a/test/fortran_align_examples/fortran-align-ifort20.f90 b/test/fortran_align_examples/fortran-align-ifort20.f90 +new file mode 100644 +index 0000000..2251662 +--- /dev/null ++++ b/test/fortran_align_examples/fortran-align-ifort20.f90 +@@ -0,0 +1,33 @@ ++program main ++ integer(kind=4) :: a=2 ++ integer(kind=4) :: b=3 ++ integer(kind=4) :: c ++ integer(kind=4) :: d ++ write(*,*) myadd(a,b) ++ write(*,*) mymuli(a,b) ++ write( *, *), 'function-myadd-addr=', loc(myadd) ++ write( *, *) , 'function-mymuli-addr=', loc(testadd) ++end program main ++ ++function myadd(first, second) ++ integer(kind=4):: first , second ++ integer(kind=4):: myadd ++ myadd= first + second ++ return ++end function myadd ++ ++function mymuli(first , second) ++ integer(kind=4):: first , second ++ integer(kind=4):: mymuli ++ mymuli= first*second ++ return ++end function mymuli ++ ++ ++! Reference ++! Intel® Fortran Compiler Classic and Intel® Fortran Compiler Developer Guide and Reference. ++! ISO/IEC 1539-1:2010 Information technology — Programming languages ++! — Fortran — Part 1: Base language. ++! ISO/IEC 1539-1:2018 Information technology — Programming languages ++! — Fortran — Part 1: Base language. ++! ISO-IECJTC1-SC22-WG5_N2146_Fortran_2018_Draft_International_Standard_for_Ballot. +diff --git a/test/fortran_align_examples/fortran-align-ifort21.f90 b/test/fortran_align_examples/fortran-align-ifort21.f90 +new file mode 100644 +index 0000000..c9b1e2c +--- /dev/null ++++ b/test/fortran_align_examples/fortran-align-ifort21.f90 +@@ -0,0 +1,27 @@ ++program main ++ implicit none ++ real, dimension (:,:), allocatable :: darray ++ integer :: s1, s2 ++ integer :: i, j ++ print*, "Enter the size of the array:" ++ s1=2 ++ s2=2 ++ ! allocate memory ++ allocate ( darray(s1,s2) ) ++ ++ do i = 1, s1 ++ do j = 1, s2 ++ darray(i,j) = i*j ++ print*, "darray(",i,",",j,") = ", darray(i,j) ++ end do ++ end do ++ ++ write(*,*) 'addr darray(1,1)' , loc( darray(1,1) ) ++ write(*,*) 'addr darray(2,1)' , loc( darray(2,1) ) ++ write(*,*) 'addr darray(1,2)' , loc( darray(1,2) ) ++ write(*,*) 'addr darray(2,2)' , loc( darray(2,2) ) ++ deallocate (darray) ++end program main ++ ++! Reference ++! https://iowiki.com/fortran/fortran_dynamic_arrays.html +diff --git a/test/fortran_align_examples/fortran-align-ifort22.f90 b/test/fortran_align_examples/fortran-align-ifort22.f90 +new file mode 100644 +index 0000000..621cc9c +--- /dev/null ++++ b/test/fortran_align_examples/fortran-align-ifort22.f90 +@@ -0,0 +1,19 @@ ++program main ++ integer(kind=1) :: a ++ integer(kind=2) :: b ++ integer(kind=4) :: c ++ integer(kind=8) :: d ++ ++ write (*,*) 'location a=', loc(a) ++ write (*,*) 'location b=', loc(b) ++ write (*,*) 'location c=', loc(c) ++ write (*,*) 'location d=', loc(d) ++end program main ++ ++! Reference ++! Intel® Fortran Compiler Classic and Intel® Fortran Compiler Developer Guide and Reference. ++! ISO/IEC 1539-1:2010 Information technology — Programming languages ++! — Fortran — Part 1: Base language. ++! ISO/IEC 1539-1:2018 Information technology — Programming languages ++! — Fortran — Part 1: Base language. ++! ISO-IECJTC1-SC22-WG5_N2146_Fortran_2018_Draft_International_Standard_for_Ballot. +diff --git a/test/fortran_align_examples/fortran-align-ifort23.f90 b/test/fortran_align_examples/fortran-align-ifort23.f90 +new file mode 100644 +index 0000000..c9b1e2c +--- /dev/null ++++ b/test/fortran_align_examples/fortran-align-ifort23.f90 +@@ -0,0 +1,27 @@ ++program main ++ implicit none ++ real, dimension (:,:), allocatable :: darray ++ integer :: s1, s2 ++ integer :: i, j ++ print*, "Enter the size of the array:" ++ s1=2 ++ s2=2 ++ ! allocate memory ++ allocate ( darray(s1,s2) ) ++ ++ do i = 1, s1 ++ do j = 1, s2 ++ darray(i,j) = i*j ++ print*, "darray(",i,",",j,") = ", darray(i,j) ++ end do ++ end do ++ ++ write(*,*) 'addr darray(1,1)' , loc( darray(1,1) ) ++ write(*,*) 'addr darray(2,1)' , loc( darray(2,1) ) ++ write(*,*) 'addr darray(1,2)' , loc( darray(1,2) ) ++ write(*,*) 'addr darray(2,2)' , loc( darray(2,2) ) ++ deallocate (darray) ++end program main ++ ++! Reference ++! https://iowiki.com/fortran/fortran_dynamic_arrays.html +diff --git a/test/fortran_align_examples/fortran-align-ifort3.f90 b/test/fortran_align_examples/fortran-align-ifort3.f90 +new file mode 100644 +index 0000000..3943db8 +--- /dev/null ++++ b/test/fortran_align_examples/fortran-align-ifort3.f90 +@@ -0,0 +1,18 @@ ++program main ++ implicit none ++ integer(kind=1) :: a ++ integer(kind=2) :: b ++ integer(kind=4) :: c ++ integer(kind=8) :: d ++ print * , kind(a) ++ print * , kind(b) ++ print * , kind(c) ++ print * , kind(d) ++end program main ++! Reference ++! Intel® Fortran Compiler Classic and Intel® Fortran Compiler Developer Guide and Reference. ++! ISO/IEC 1539-1:2010 Information technology — Programming languages ++! — Fortran — Part 1: Base language. ++! ISO/IEC 1539-1:2018 Information technology — Programming languages ++! — Fortran — Part 1: Base language. ++! ISO-IECJTC1-SC22-WG5_N2146_Fortran_2018_Draft_International_Standard_for_Ballot. +diff --git a/test/fortran_align_examples/fortran-align-ifort4.f90 b/test/fortran_align_examples/fortran-align-ifort4.f90 +new file mode 100644 +index 0000000..c0e3174 +--- /dev/null ++++ b/test/fortran_align_examples/fortran-align-ifort4.f90 +@@ -0,0 +1,20 @@ ++program main ++ integer(kind=1) :: a ++ integer(kind=2) :: b ++ integer(kind=4) :: c ++ integer(kind=8) :: d ++ ++ write (*,*) 'location a=', loc(a) ++ write (*,*) 'location b=', loc(b) ++ write (*,*) 'location c=', loc(c) ++ write (*,*) 'location d=', loc(d) ++end program main ++ ++ ++! Reference ++! Intel® Fortran Compiler Classic and Intel® Fortran Compiler Developer Guide and Reference. ++! ISO/IEC 1539-1:2010 Information technology — Programming languages ++! — Fortran — Part 1: Base language. ++! ISO/IEC 1539-1:2018 Information technology — Programming languages ++! — Fortran — Part 1: Base language. ++! ISO-IECJTC1-SC22-WG5_N2146_Fortran_2018_Draft_International_Standard_for_Ballot. +diff --git a/test/fortran_align_examples/fortran-align-ifort5.f90 b/test/fortran_align_examples/fortran-align-ifort5.f90 +new file mode 100644 +index 0000000..f0ea6e6 +--- /dev/null ++++ b/test/fortran_align_examples/fortran-align-ifort5.f90 +@@ -0,0 +1,16 @@ ++program main ++ implicit none ++ real(kind=4) :: c ++ real(kind=8) :: d ++ real(kind=16) :: e ++ print * , kind(c) ++ print * , kind(d) ++ print * , kind(e) ++end program main ++! Reference ++! Intel® Fortran Compiler Classic and Intel® Fortran Compiler Developer Guide and Reference. ++! ISO/IEC 1539-1:2010 Information technology — Programming languages ++! — Fortran — Part 1: Base language. ++! ISO/IEC 1539-1:2018 Information technology — Programming languages ++! — Fortran — Part 1: Base language. ++! ISO-IECJTC1-SC22-WG5_N2146_Fortran_2018_Draft_International_Standard_for_Ballot. +diff --git a/test/fortran_align_examples/fortran-align-ifort6.f90 b/test/fortran_align_examples/fortran-align-ifort6.f90 +new file mode 100644 +index 0000000..623e92a +--- /dev/null ++++ b/test/fortran_align_examples/fortran-align-ifort6.f90 +@@ -0,0 +1,18 @@ ++program main ++ implicit none ++ complex(kind=4) :: c ++ complex(kind=8) :: d ++ complex(kind=16) :: e ++ print * , kind(c) ++ print * , kind(d) ++ print * , kind(e) ++end program main ++ ++ ++! Reference ++! Intel® Fortran Compiler Classic and Intel® Fortran Compiler Developer Guide and Reference. ++! ISO/IEC 1539-1:2010 Information technology — Programming languages ++! — Fortran — Part 1: Base language. ++! ISO/IEC 1539-1:2018 Information technology — Programming languages ++! — Fortran — Part 1: Base language. ++! ISO-IECJTC1-SC22-WG5_N2146_Fortran_2018_Draft_International_Standard_for_Ballot. +diff --git a/test/fortran_align_examples/fortran-align-ifort7.f90 b/test/fortran_align_examples/fortran-align-ifort7.f90 +new file mode 100644 +index 0000000..42f4713 +--- /dev/null ++++ b/test/fortran_align_examples/fortran-align-ifort7.f90 +@@ -0,0 +1,14 @@ ++program main ++ implicit none ++ integer(kind=4) :: test(1000) ++ write (*,*) 'location test=', loc(test) ++ write (*,*) 'location test[1]=', loc(test(1)) ++ write (*,*) 'location test[2]=', loc(test(2)) ++end program main ++! Reference ++! Intel® Fortran Compiler Classic and Intel® Fortran Compiler Developer Guide and Reference. ++! ISO/IEC 1539-1:2010 Information technology — Programming languages ++! — Fortran — Part 1: Base language. ++! ISO/IEC 1539-1:2018 Information technology — Programming languages ++! — Fortran — Part 1: Base language. ++! ISO-IECJTC1-SC22-WG5_N2146_Fortran_2018_Draft_International_Standard_for_Ballot. +diff --git a/test/fortran_align_examples/fortran-align-ifort8.f90 b/test/fortran_align_examples/fortran-align-ifort8.f90 +new file mode 100644 +index 0000000..f03362b +--- /dev/null ++++ b/test/fortran_align_examples/fortran-align-ifort8.f90 +@@ -0,0 +1,19 @@ ++program main ++ implicit none ++ type demo ++ integer(kind=4) :: a(3) ++ real(kind=4) :: b ++ logical(kind=1) :: c ++ end type ++ type(demo) :: test ++ write (*,*) 'location c=', loc(test%c) ++ write (*,*) 'location b=', loc(test%b) ++ write (*,*) 'location a=', loc(test%a) ++end program main ++! Reference ++! Intel® Fortran Compiler Classic and Intel® Fortran Compiler Developer Guide and Reference. ++! ISO/IEC 1539-1:2010 Information technology — Programming languages ++! — Fortran — Part 1: Base language. ++! ISO/IEC 1539-1:2018 Information technology — Programming languages ++! — Fortran — Part 1: Base language. ++! ISO-IECJTC1-SC22-WG5_N2146_Fortran_2018_Draft_International_Standard_for_Ballot. +diff --git a/test/fortran_align_examples/fortran-align-ifort9.f90 b/test/fortran_align_examples/fortran-align-ifort9.f90 +new file mode 100644 +index 0000000..c5e65a3 +--- /dev/null ++++ b/test/fortran_align_examples/fortran-align-ifort9.f90 +@@ -0,0 +1,23 @@ ++program main ++ call one() ++ call two() ++ write( *, *), 'subroutine-one-addr=', loc(one) ++ write( *, *) , 'subroutine-two-addr=', loc(two) ++ ++end program main ++ ++subroutine one() ++ integer :: a=3 ++ print * , a ++end subroutine one ++ ++subroutine two() ++ print * , 'two' ++end subroutine two ++! Reference ++! Intel® Fortran Compiler Classic and Intel® Fortran Compiler Developer Guide and Reference. ++! ISO/IEC 1539-1:2010 Information technology — Programming languages ++! — Fortran — Part 1: Base language. ++! ISO/IEC 1539-1:2018 Information technology — Programming languages ++! — Fortran — Part 1: Base language. ++! ISO-IECJTC1-SC22-WG5_N2146_Fortran_2018_Draft_International_Standard_for_Ballot. +diff --git a/test/fortran_align_examples/run-compiler-classic-flang1.sh b/test/fortran_align_examples/run-compiler-classic-flang1.sh +new file mode 100644 +index 0000000..12a1e9e +--- /dev/null ++++ b/test/fortran_align_examples/run-compiler-classic-flang1.sh +@@ -0,0 +1,2 @@ ++#!/bin/bash ++flang fortran-align-classic-flang1.f90 -o fortran-align-classic-flang1.out +diff --git a/test/fortran_align_examples/run-compiler-classic-flang10.sh b/test/fortran_align_examples/run-compiler-classic-flang10.sh +new file mode 100644 +index 0000000..8baf7d2 +--- /dev/null ++++ b/test/fortran_align_examples/run-compiler-classic-flang10.sh +@@ -0,0 +1,2 @@ ++#!/bin/bash ++flang fortran-align-classic-flang10.f90 -o fortran-align-classic-flang10.out +diff --git a/test/fortran_align_examples/run-compiler-classic-flang11.sh b/test/fortran_align_examples/run-compiler-classic-flang11.sh +new file mode 100644 +index 0000000..2cc7957 +--- /dev/null ++++ b/test/fortran_align_examples/run-compiler-classic-flang11.sh +@@ -0,0 +1,2 @@ ++#!/bin/bash ++flang fortran-align-classic-flang11.f90 -o fortran-align-classic-flang11.out +diff --git a/test/fortran_align_examples/run-compiler-classic-flang12.sh b/test/fortran_align_examples/run-compiler-classic-flang12.sh +new file mode 100644 +index 0000000..f754362 +--- /dev/null ++++ b/test/fortran_align_examples/run-compiler-classic-flang12.sh +@@ -0,0 +1,2 @@ ++#!/bin/bash ++flang fortran-align-classic-flang12.f90 -o fortran-align-classic-flang12.out +diff --git a/test/fortran_align_examples/run-compiler-classic-flang13.sh b/test/fortran_align_examples/run-compiler-classic-flang13.sh +new file mode 100644 +index 0000000..04b436a +--- /dev/null ++++ b/test/fortran_align_examples/run-compiler-classic-flang13.sh +@@ -0,0 +1,2 @@ ++#!/bin/bash ++flang fortran-align-classic-flang13.f90 -o fortran-align-classic-flang13.out +diff --git a/test/fortran_align_examples/run-compiler-classic-flang2.sh b/test/fortran_align_examples/run-compiler-classic-flang2.sh +new file mode 100644 +index 0000000..bf6fcde +--- /dev/null ++++ b/test/fortran_align_examples/run-compiler-classic-flang2.sh +@@ -0,0 +1,2 @@ ++#!/bin/bash ++flang fortran-align-classic-flang2.f90 -o fortran-align-classic-flang2.out +diff --git a/test/fortran_align_examples/run-compiler-classic-flang3.sh b/test/fortran_align_examples/run-compiler-classic-flang3.sh +new file mode 100644 +index 0000000..6a19ba2 +--- /dev/null ++++ b/test/fortran_align_examples/run-compiler-classic-flang3.sh +@@ -0,0 +1,2 @@ ++#!/bin/bash ++flang fortran-align-classic-flang3.f90 -o fortran-align-classic-flang3.out +diff --git a/test/fortran_align_examples/run-compiler-classic-flang4.sh b/test/fortran_align_examples/run-compiler-classic-flang4.sh +new file mode 100644 +index 0000000..5b38e03 +--- /dev/null ++++ b/test/fortran_align_examples/run-compiler-classic-flang4.sh +@@ -0,0 +1,2 @@ ++#!/bin/bash ++flang fortran-align-classic-flang4.f90 -o fortran-align-classic-flang4.out +diff --git a/test/fortran_align_examples/run-compiler-classic-flang5.sh b/test/fortran_align_examples/run-compiler-classic-flang5.sh +new file mode 100644 +index 0000000..a167366 +--- /dev/null ++++ b/test/fortran_align_examples/run-compiler-classic-flang5.sh +@@ -0,0 +1,2 @@ ++#!/bin/bash ++flang fortran-align-classic-flang5.f90 -o fortran-align-classic-flang5.out +diff --git a/test/fortran_align_examples/run-compiler-classic-flang6.sh b/test/fortran_align_examples/run-compiler-classic-flang6.sh +new file mode 100644 +index 0000000..f52057d +--- /dev/null ++++ b/test/fortran_align_examples/run-compiler-classic-flang6.sh +@@ -0,0 +1,2 @@ ++#!/bin/bash ++flang fortran-align-classic-flang6.f90 -o fortran-align-classic-flang6.out +diff --git a/test/fortran_align_examples/run-compiler-classic-flang7.sh b/test/fortran_align_examples/run-compiler-classic-flang7.sh +new file mode 100644 +index 0000000..2c46e7e +--- /dev/null ++++ b/test/fortran_align_examples/run-compiler-classic-flang7.sh +@@ -0,0 +1,2 @@ ++#!/bin/bash ++flang fortran-align-classic-flang7.f90 -o fortran-align-classic-flang7.out +diff --git a/test/fortran_align_examples/run-compiler-classic-flang8.sh b/test/fortran_align_examples/run-compiler-classic-flang8.sh +new file mode 100644 +index 0000000..5f81dbd +--- /dev/null ++++ b/test/fortran_align_examples/run-compiler-classic-flang8.sh +@@ -0,0 +1,2 @@ ++#!/bin/bash ++flang fortran-align-classic-flang8.f90 -o fortran-align-classic-flang8.out +diff --git a/test/fortran_align_examples/run-compiler-classic-flang9.sh b/test/fortran_align_examples/run-compiler-classic-flang9.sh +new file mode 100644 +index 0000000..633f628 +--- /dev/null ++++ b/test/fortran_align_examples/run-compiler-classic-flang9.sh +@@ -0,0 +1,2 @@ ++#!/bin/bash ++flang fortran-align-classic-flang9.f90 -o fortran-align-classic-flang9.out +diff --git a/test/fortran_align_examples/run-compiler-gfortran1.sh b/test/fortran_align_examples/run-compiler-gfortran1.sh +new file mode 100644 +index 0000000..27ee121 +--- /dev/null ++++ b/test/fortran_align_examples/run-compiler-gfortran1.sh +@@ -0,0 +1,2 @@ ++#!/bin/bash ++gfortran fortran-align-gfortran1.f90 -o fortran-align-gfortran1.out +diff --git a/test/fortran_align_examples/run-compiler-gfortran10.sh b/test/fortran_align_examples/run-compiler-gfortran10.sh +new file mode 100644 +index 0000000..3b35a28 +--- /dev/null ++++ b/test/fortran_align_examples/run-compiler-gfortran10.sh +@@ -0,0 +1,2 @@ ++#!/bin/bash ++gfortran fortran-align-gfortran10.f90 -o fortran-align-gfortran10.out +diff --git a/test/fortran_align_examples/run-compiler-gfortran11.sh b/test/fortran_align_examples/run-compiler-gfortran11.sh +new file mode 100644 +index 0000000..65cd547 +--- /dev/null ++++ b/test/fortran_align_examples/run-compiler-gfortran11.sh +@@ -0,0 +1,2 @@ ++#!/bin/bash ++gfortran fortran-align-gfortran11.f90 -o fortran-align-gfortran11.out +diff --git a/test/fortran_align_examples/run-compiler-gfortran12.sh b/test/fortran_align_examples/run-compiler-gfortran12.sh +new file mode 100644 +index 0000000..f247b42 +--- /dev/null ++++ b/test/fortran_align_examples/run-compiler-gfortran12.sh +@@ -0,0 +1,2 @@ ++#!/bin/bash ++gfortran fortran-align-gfortran12.f90 -o fortran-align-gfortran12.out +diff --git a/test/fortran_align_examples/run-compiler-gfortran13.sh b/test/fortran_align_examples/run-compiler-gfortran13.sh +new file mode 100644 +index 0000000..b546f47 +--- /dev/null ++++ b/test/fortran_align_examples/run-compiler-gfortran13.sh +@@ -0,0 +1,2 @@ ++#!/bin/bash ++gfortran fortran-align-gfortran13.f90 -o fortran-align-gfortran13.out +diff --git a/test/fortran_align_examples/run-compiler-gfortran2.sh b/test/fortran_align_examples/run-compiler-gfortran2.sh +new file mode 100644 +index 0000000..df994b7 +--- /dev/null ++++ b/test/fortran_align_examples/run-compiler-gfortran2.sh +@@ -0,0 +1,2 @@ ++#!/bin/bash ++gfortran fortran-align-gfortran2.f90 -o fortran-align-gfortran2.out +diff --git a/test/fortran_align_examples/run-compiler-gfortran3.sh b/test/fortran_align_examples/run-compiler-gfortran3.sh +new file mode 100644 +index 0000000..826e8a1 +--- /dev/null ++++ b/test/fortran_align_examples/run-compiler-gfortran3.sh +@@ -0,0 +1,2 @@ ++#!/bin/bash ++gfortran fortran-align-gfortran3.f90 -o fortran-align-gfortran3.out +diff --git a/test/fortran_align_examples/run-compiler-gfortran4.sh b/test/fortran_align_examples/run-compiler-gfortran4.sh +new file mode 100644 +index 0000000..4ea0773 +--- /dev/null ++++ b/test/fortran_align_examples/run-compiler-gfortran4.sh +@@ -0,0 +1,2 @@ ++#!/bin/bash ++gfortran fortran-align-gfortran4.f90 -o fortran-align-gfortran4.out +diff --git a/test/fortran_align_examples/run-compiler-gfortran5.sh b/test/fortran_align_examples/run-compiler-gfortran5.sh +new file mode 100644 +index 0000000..af742ee +--- /dev/null ++++ b/test/fortran_align_examples/run-compiler-gfortran5.sh +@@ -0,0 +1,2 @@ ++#!/bin/bash ++gfortran fortran-align-gfortran5.f90 -o fortran-align-gfortran5.out +diff --git a/test/fortran_align_examples/run-compiler-gfortran6.sh b/test/fortran_align_examples/run-compiler-gfortran6.sh +new file mode 100644 +index 0000000..f90cc00 +--- /dev/null ++++ b/test/fortran_align_examples/run-compiler-gfortran6.sh +@@ -0,0 +1,2 @@ ++#!/bin/bash ++gfortran fortran-align-gfortran6.f90 -o fortran-align-gfortran6.out +diff --git a/test/fortran_align_examples/run-compiler-gfortran7.sh b/test/fortran_align_examples/run-compiler-gfortran7.sh +new file mode 100644 +index 0000000..e979089 +--- /dev/null ++++ b/test/fortran_align_examples/run-compiler-gfortran7.sh +@@ -0,0 +1,2 @@ ++#!/bin/bash ++gfortran fortran-align-gfortran7.f90 -o fortran-align-gfortran7.out +diff --git a/test/fortran_align_examples/run-compiler-gfortran8.sh b/test/fortran_align_examples/run-compiler-gfortran8.sh +new file mode 100644 +index 0000000..fc8fe2f +--- /dev/null ++++ b/test/fortran_align_examples/run-compiler-gfortran8.sh +@@ -0,0 +1,2 @@ ++#!/bin/bash ++gfortran fortran-align-gfortran8.f90 -o fortran-align-gfortran8.out +diff --git a/test/fortran_align_examples/run-compiler-gfortran9.sh b/test/fortran_align_examples/run-compiler-gfortran9.sh +new file mode 100644 +index 0000000..5ef2717 +--- /dev/null ++++ b/test/fortran_align_examples/run-compiler-gfortran9.sh +@@ -0,0 +1,2 @@ ++#!/bin/bash ++gfortran fortran-align-gfortran9.f90 -o fortran-align-gfortran9.out +diff --git a/test/fortran_align_examples/run-compiler-ifort1.sh b/test/fortran_align_examples/run-compiler-ifort1.sh +new file mode 100644 +index 0000000..a6b8071 +--- /dev/null ++++ b/test/fortran_align_examples/run-compiler-ifort1.sh +@@ -0,0 +1,2 @@ ++#!/bin/bash ++ifort fortran-align-ifort1.f90 -o fortran-align-ifort1.out +diff --git a/test/fortran_align_examples/run-compiler-ifort10.sh b/test/fortran_align_examples/run-compiler-ifort10.sh +new file mode 100644 +index 0000000..1cdd5a7 +--- /dev/null ++++ b/test/fortran_align_examples/run-compiler-ifort10.sh +@@ -0,0 +1,2 @@ ++#!/bin/bash ++ifort fortran-align-ifort10.f90 -o fortran-align-ifort10.out +diff --git a/test/fortran_align_examples/run-compiler-ifort11.sh b/test/fortran_align_examples/run-compiler-ifort11.sh +new file mode 100644 +index 0000000..0441f12 +--- /dev/null ++++ b/test/fortran_align_examples/run-compiler-ifort11.sh +@@ -0,0 +1,2 @@ ++#!/bin/bash ++ifort fortran-align-ifort11.f90 -o fortran-align-ifort11.out +diff --git a/test/fortran_align_examples/run-compiler-ifort12.sh b/test/fortran_align_examples/run-compiler-ifort12.sh +new file mode 100644 +index 0000000..795cc7a +--- /dev/null ++++ b/test/fortran_align_examples/run-compiler-ifort12.sh +@@ -0,0 +1,2 @@ ++#!/bin/bash ++ifort fortran-align-ifort12.f90 -o fortran-align-ifort12.out +diff --git a/test/fortran_align_examples/run-compiler-ifort13.sh b/test/fortran_align_examples/run-compiler-ifort13.sh +new file mode 100644 +index 0000000..00dd1ad +--- /dev/null ++++ b/test/fortran_align_examples/run-compiler-ifort13.sh +@@ -0,0 +1,3 @@ ++#!/bin/bash ++#ifort fortran-align-ifort13.f90 -o fortran-align-ifort13.out ++ifort fortran-align-ifort13.f90 -o fortran-align-ifort13.out -align none +diff --git a/test/fortran_align_examples/run-compiler-ifort14.sh b/test/fortran_align_examples/run-compiler-ifort14.sh +new file mode 100644 +index 0000000..34dae77 +--- /dev/null ++++ b/test/fortran_align_examples/run-compiler-ifort14.sh +@@ -0,0 +1,5 @@ ++#!/bin/bash ++#ifort fortran-align-ifort14.f90 -o fortran-align-ifort14.out ++ifort fortran-align-ifort14.f90 -o fortran-align-ifort14.out -align array16byte ++#ifort fortran-align-ifort14.f90 -o fortran-align-ifort14.out -align array32byte ++#ifort fortran-align-ifort14.f90 -o fortran-align-ifort14.out -align array128byte +diff --git a/test/fortran_align_examples/run-compiler-ifort15.sh b/test/fortran_align_examples/run-compiler-ifort15.sh +new file mode 100644 +index 0000000..cd97d0f +--- /dev/null ++++ b/test/fortran_align_examples/run-compiler-ifort15.sh +@@ -0,0 +1,6 @@ ++#!/bin/bash ++#ifort fortran-align-ifort15.f90 -o fortran-align-ifort15.out ++#ifort fortran-align-ifort15.f90 -o fortran-align-ifort15.out -align commons ++ifort fortran-align-ifort15.f90 -o fortran-align-ifort15.out -align dcommons ++#ifort fortran-align-ifort15.f90 -o fortran-align-ifort15.out -align qcommons ++#ifort fortran-align-ifort15.f90 -o fortran-align-ifort15.out -align zcommons +diff --git a/test/fortran_align_examples/run-compiler-ifort16.sh b/test/fortran_align_examples/run-compiler-ifort16.sh +new file mode 100644 +index 0000000..af5441f +--- /dev/null ++++ b/test/fortran_align_examples/run-compiler-ifort16.sh +@@ -0,0 +1,4 @@ ++#!/bin/bash ++#ifort fortran-align-ifort16.f90 -o fortran-align-ifort16.out ++ifort fortran-align-ifort16.f90 -o fortran-align-ifort16.out -align norecords ++#ifort fortran-align-ifort16.f90 -o fortran-align-ifort16.out -align records +diff --git a/test/fortran_align_examples/run-compiler-ifort17.sh b/test/fortran_align_examples/run-compiler-ifort17.sh +new file mode 100644 +index 0000000..945849f +--- /dev/null ++++ b/test/fortran_align_examples/run-compiler-ifort17.sh +@@ -0,0 +1,3 @@ ++#!/bin/bash ++#ifort fortran-align-ifort17.f90 -o fortran-align-ifort17.out ++ifort fortran-align-ifort17.f90 -o fortran-align-ifort17.out -align rec2byte +diff --git a/test/fortran_align_examples/run-compiler-ifort18.sh b/test/fortran_align_examples/run-compiler-ifort18.sh +new file mode 100644 +index 0000000..249de55 +--- /dev/null ++++ b/test/fortran_align_examples/run-compiler-ifort18.sh +@@ -0,0 +1,4 @@ ++#!/bin/bash ++#ifort fortran-align-ifort18.f90 -o fortran-align-ifort18.out ++ifort fortran-align-ifort18.f90 -o fortran-align-ifort18.out -align sequence ++#ifort fortran-align-ifort18.f90 -o fortran-align-ifort18.out -align nosequence +diff --git a/test/fortran_align_examples/run-compiler-ifort19.sh b/test/fortran_align_examples/run-compiler-ifort19.sh +new file mode 100644 +index 0000000..c474e6b +--- /dev/null ++++ b/test/fortran_align_examples/run-compiler-ifort19.sh +@@ -0,0 +1,4 @@ ++#!/bin/bash ++#ifort fortran-align-ifort19.f90 -o fortran-align-ifort19.out ++ifort fortran-align-ifort19.f90 -o fortran-align-ifort19.out -qno-opt-dynamic-align ++#ifort fortran-align-ifort19.f90 -o fortran-align-ifort19.out -qopt-dynamic-align +diff --git a/test/fortran_align_examples/run-compiler-ifort2.sh b/test/fortran_align_examples/run-compiler-ifort2.sh +new file mode 100644 +index 0000000..0ea2714 +--- /dev/null ++++ b/test/fortran_align_examples/run-compiler-ifort2.sh +@@ -0,0 +1,2 @@ ++#!/bin/bash ++ifort fortran-align-ifort2.f90 -o fortran-align-ifort2.out +diff --git a/test/fortran_align_examples/run-compiler-ifort20.sh b/test/fortran_align_examples/run-compiler-ifort20.sh +new file mode 100644 +index 0000000..1aa5d5a +--- /dev/null ++++ b/test/fortran_align_examples/run-compiler-ifort20.sh +@@ -0,0 +1,5 @@ ++#!/bin/bash ++#ifort fortran-align-ifort20.f90 -o fortran-align-ifort20.out ++ifort fortran-align-ifort20.f90 -o fortran-align-ifort20.out -falign-functions=32 ++#ifort fortran-align-ifort20.f90 -o fortran-align-ifort20.out -falign-functions=64 ++#ifort fortran-align-ifort20.f90 -o fortran-align-ifort20.out -fno-align-functions +diff --git a/test/fortran_align_examples/run-compiler-ifort21.sh b/test/fortran_align_examples/run-compiler-ifort21.sh +new file mode 100644 +index 0000000..61e311e +--- /dev/null ++++ b/test/fortran_align_examples/run-compiler-ifort21.sh +@@ -0,0 +1,4 @@ ++#!/bin/bash ++#ifort fortran-align-ifort21.f90 -o fortran-align-ifort21.out ++ifort fortran-align-ifort21.f90 -o fortran-align-ifort21.out -falign-loops=32 ++#ifort fortran-align-ifort21.f90 -o fortran-align-ifort21.out -falign-loops=128 +diff --git a/test/fortran_align_examples/run-compiler-ifort22.sh b/test/fortran_align_examples/run-compiler-ifort22.sh +new file mode 100644 +index 0000000..2e506d9 +--- /dev/null ++++ b/test/fortran_align_examples/run-compiler-ifort22.sh +@@ -0,0 +1,4 @@ ++#!/bin/bash ++#ifort fortran-align-ifort22.f90 -o fortran-align-ifort22.out ++ifort fortran-align-ifort22.f90 -o fortran-align-ifort22.out -mbranches-within-32B-boundaries ++#ifort fortran-align-ifort22.f90 -o fortran-align-ifort22.out -mno-branches-within-32B-boundaries +diff --git a/test/fortran_align_examples/run-compiler-ifort23.sh b/test/fortran_align_examples/run-compiler-ifort23.sh +new file mode 100644 +index 0000000..ce6218f +--- /dev/null ++++ b/test/fortran_align_examples/run-compiler-ifort23.sh +@@ -0,0 +1,4 @@ ++#!/bin/bash ++#ifort fortran-align-ifort23.f90 -o fortran-align-ifort23.out ++ifort fortran-align-ifort23.f90 -o fortran-align-ifort23.out -qopt-dynamic-align ++#ifort fortran-align-ifort23.f90 -o fortran-align-ifort23.out -qno-opt-dynamic-align +diff --git a/test/fortran_align_examples/run-compiler-ifort3.sh b/test/fortran_align_examples/run-compiler-ifort3.sh +new file mode 100644 +index 0000000..6460389 +--- /dev/null ++++ b/test/fortran_align_examples/run-compiler-ifort3.sh +@@ -0,0 +1,2 @@ ++#!/bin/bash ++ifort fortran-align-ifort3.f90 -o fortran-align-ifort3.out +diff --git a/test/fortran_align_examples/run-compiler-ifort4.sh b/test/fortran_align_examples/run-compiler-ifort4.sh +new file mode 100644 +index 0000000..ebd9420 +--- /dev/null ++++ b/test/fortran_align_examples/run-compiler-ifort4.sh +@@ -0,0 +1,2 @@ ++#!/bin/bash ++ifort fortran-align-ifort4.f90 -o fortran-align-ifort4.out +diff --git a/test/fortran_align_examples/run-compiler-ifort5.sh b/test/fortran_align_examples/run-compiler-ifort5.sh +new file mode 100644 +index 0000000..2689ca2 +--- /dev/null ++++ b/test/fortran_align_examples/run-compiler-ifort5.sh +@@ -0,0 +1,2 @@ ++#!/bin/bash ++ifort fortran-align-ifort5.f90 -o fortran-align-ifort5.out +diff --git a/test/fortran_align_examples/run-compiler-ifort6.sh b/test/fortran_align_examples/run-compiler-ifort6.sh +new file mode 100644 +index 0000000..165bac9 +--- /dev/null ++++ b/test/fortran_align_examples/run-compiler-ifort6.sh +@@ -0,0 +1,2 @@ ++#!/bin/bash ++ifort fortran-align-ifort6.f90 -o fortran-align-ifort6.out +diff --git a/test/fortran_align_examples/run-compiler-ifort7.sh b/test/fortran_align_examples/run-compiler-ifort7.sh +new file mode 100644 +index 0000000..ec0fa01 +--- /dev/null ++++ b/test/fortran_align_examples/run-compiler-ifort7.sh +@@ -0,0 +1,2 @@ ++#!/bin/bash ++ifort fortran-align-ifort7.f90 -o fortran-align-ifort7.out +diff --git a/test/fortran_align_examples/run-compiler-ifort8.sh b/test/fortran_align_examples/run-compiler-ifort8.sh +new file mode 100644 +index 0000000..da6db13 +--- /dev/null ++++ b/test/fortran_align_examples/run-compiler-ifort8.sh +@@ -0,0 +1,2 @@ ++#!/bin/bash ++ifort fortran-align-ifort8.f90 -o fortran-align-ifort8.out +diff --git a/test/fortran_align_examples/run-compiler-ifort9.sh b/test/fortran_align_examples/run-compiler-ifort9.sh +new file mode 100644 +index 0000000..53a6626 +--- /dev/null ++++ b/test/fortran_align_examples/run-compiler-ifort9.sh +@@ -0,0 +1,2 @@ ++#!/bin/bash ++ifort fortran-align-ifort9.f90 -o fortran-align-ifort9.out +-- +2.37.1 (Apple Git-137.1) + diff --git a/flang.spec b/flang.spec index 74faadbfcb061e335c948c517bad213d75d269ee..2abfa059b539605745462274dfd615e190927179 100644 --- a/flang.spec +++ b/flang.spec @@ -2,7 +2,7 @@ Name: flang Version: flang_20210324 -Release: 18 +Release: 19 Summary: Fortran language compiler targeting LLVM License: Apache-2.0 @@ -27,6 +27,7 @@ Patch12: 13-test-interoperability-with-c-c-call-fortran-global-and-struct.patch Patch13: 14-add-test-cases-for-attribute-declarations-and-specifications-2.patch Patch14: 15-add-test-cases-for-types-2.patch Patch15: 16-add-c-and-cxx-memory-align-investigation.patch +Patch16: 17-add-fortran-memory-align-investigation.patch %description Flang depends on a fork of the LLVM project (https://github.com/flang-compiler/classic-flang-llvm-project). The fork made some changes to the upstream LLVM project to support Flang toolchain. Flang cannot build independently for now. @@ -48,6 +49,9 @@ TODO: support build Flang. %changelog +* Tue Dec 20 2022 huwei - flang_20210324-19 +- Add 17-add-fortran-memory-align-investigation.patch for add fortran memory align investigation + * Tue Dec 13 2022 huwei - flang_20210324-18 - Add 16-add-c-and-cxx-memory-align-investigation.patch for add c and cxx memory align investigation