Runs with and without class…allocatable statements commented out.
Sun 21 Aug 2022 07:21:17 AEST
(07:21 ian@ian-HP-Stream-Laptop-11-y0XX ~) > gfortran -v -save-temps model.f -c
Using built-in specs.
COLLECT_GCC=gfortran
OFFLOAD_TARGET_NAMES=nvptx-none:amdgcn-amdhsa
OFFLOAD_TARGET_DEFAULT=1
Target: x86_64-linux-gnu
Configured with: …/src/configure -v --with-pkgversion=‘Ubuntu 11.2.0-19ubuntu1’ --with-bugurl=file:///usr/share/doc/gcc-11/README.Bugs --enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++,m2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-11 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-bootstrap --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-plugin --enable-default-pie --with-system-zlib --enable-libphobos-checking=release --with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch --disable-werror --enable-cet --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none=/build/gcc-11-gBFGDP/gcc-11-11.2.0/debian/tmp-nvptx/usr,amdgcn-amdhsa=/build/gcc-11-gBFGDP/gcc-11-11.2.0/debian/tmp-gcn/usr --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu --with-build-config=bootstrap-lto-lean --enable-link-serialization=2
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 11.2.0 (Ubuntu 11.2.0-19ubuntu1)
COLLECT_GCC_OPTIONS=‘-v’ ‘-save-temps’ ‘-c’ ‘-mtune=generic’ ‘-march=x86-64’
/usr/lib/gcc/x86_64-linux-gnu/11/f951 model.f -ffixed-form -quiet -dumpbase model.f -dumpbase-ext .f -mtune=generic -march=x86-64 -version -fintrinsic-modules-path /usr/lib/gcc/x86_64-linux-gnu/11/finclude -fpre-include=/usr/include/finclude/math-vector-fortran.h -o model.s
GNU Fortran (Ubuntu 11.2.0-19ubuntu1) version 11.2.0 (x86_64-linux-gnu)
compiled by GNU C version 11.2.0, GMP version 6.2.1, MPFR version 4.1.0, MPC version 1.2.1, isl version isl-0.24-GMP
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
GNU Fortran2008 (Ubuntu 11.2.0-19ubuntu1) version 11.2.0 (x86_64-linux-gnu)
compiled by GNU C version 11.2.0, GMP version 6.2.1, MPFR version 4.1.0, MPC version 1.2.1, isl version isl-0.24-GMP
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
COLLECT_GCC_OPTIONS=‘-v’ ‘-save-temps’ ‘-c’ ‘-mtune=generic’ ‘-march=x86-64’
as -v --64 -o model.o model.s
GNU assembler version 2.38 (x86_64-linux-gnu) using BFD version (GNU Binutils for Ubuntu) 2.38
COMPILER_PATH=/usr/lib/gcc/x86_64-linux-gnu/11/:/usr/lib/gcc/x86_64-linux-gnu/11/:/usr/lib/gcc/x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/11/:/usr/lib/gcc/x86_64-linux-gnu/
LIBRARY_PATH=/usr/lib/gcc/x86_64-linux-gnu/11/:/usr/lib/gcc/x86_64-linux-gnu/11/…/…/…/x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/11/…/…/…/…/lib/:/lib/x86_64-linux-gnu/:/lib/…/lib/:/usr/lib/x86_64-linux-gnu/:/usr/lib/…/lib/:/usr/lib/gcc/x86_64-linux-gnu/11/…/…/…/:/lib/:/usr/lib/
COLLECT_GCC_OPTIONS=‘-v’ ‘-save-temps’ ‘-c’ ‘-mtune=generic’ ‘-march=x86-64’
(07:22 ian@ian-HP-Stream-Laptop-11-y0XX ~) > cat model.f
module bst_base_mod
! Binary Search Tree Module
implicit none
public
integer, parameter :: bst_success = 0
integer, parameter :: bst_duplicate = 1
integer, parameter :: bst_error = 2
! the following data type is intended to be extended with the problem-specific data.
type, abstract :: bst_base_node_type
class(bst_base_node_type), allocatable :: left
class(bst_base_node_type), allocatable :: right
contains
procedure (compare_interface), deferred :: compare
procedure (print_interface), deferred :: print
end type bst_base_node_type
abstract interface
! these subroutine stubs should be overridden with the appropriate extended node type.
integer function compare_interface( node1, node2 )
! output: -1 means node1 < node2
! 0 means node1 == node2
! +1 means node1 > node2
! n means node1 and node2 could not be compared.
import :: bst_base_node_type
class(bst_base_node_type), intent(in) :: node1, node2
end function compare_interface
subroutine print_interface ( node, level )
import :: bst_base_node_type
class(bst_base_node_type), intent(in) :: node
integer, intent(in) :: level
end subroutine print_interface
end interface
end module bst_base_mod
(07:33 ian@ian-HP-Stream-Laptop-11-y0XX ~) > cat model2.f
module bst_base_mod
! Binary Search Tree Module
implicit none
public
integer, parameter :: bst_success = 0
integer, parameter :: bst_duplicate = 1
integer, parameter :: bst_error = 2
! the following data type is intended to be extended with the problem-specific data.
type, abstract :: bst_base_node_type
! class(bst_base_node_type), allocatable :: left
! class(bst_base_node_type), allocatable :: right
contains
procedure (compare_interface), deferred :: compare
procedure (print_interface), deferred :: print
end type bst_base_node_type
abstract interface
! these subroutine stubs should be overridden with the appropriate extended node type.
integer function compare_interface( node1, node2 )
! output: -1 means node1 < node2
! 0 means node1 == node2
! +1 means node1 > node2
! n means node1 and node2 could not be compared.
import :: bst_base_node_type
class(bst_base_node_type), intent(in) :: node1, node2
end function compare_interface
subroutine print_interface ( node, level )
import :: bst_base_node_type
class(bst_base_node_type), intent(in) :: node
integer, intent(in) :: level
end subroutine print_interface
end interface
end module bst_base_mod
(07:34 ian@ian-HP-Stream-Laptop-11-y0XX ~) > gfortran -v -save-temps model.f -c
Using built-in specs.
COLLECT_GCC=gfortran
OFFLOAD_TARGET_NAMES=nvptx-none:amdgcn-amdhsa
OFFLOAD_TARGET_DEFAULT=1
Target: x86_64-linux-gnu
Configured with: …/src/configure -v --with-pkgversion=‘Ubuntu 11.2.0-19ubuntu1’ --with-bugurl=file:///usr/share/doc/gcc-11/README.Bugs --enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++,m2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-11 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-bootstrap --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-plugin --enable-default-pie --with-system-zlib --enable-libphobos-checking=release --with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch --disable-werror --enable-cet --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none=/build/gcc-11-gBFGDP/gcc-11-11.2.0/debian/tmp-nvptx/usr,amdgcn-amdhsa=/build/gcc-11-gBFGDP/gcc-11-11.2.0/debian/tmp-gcn/usr --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu --with-build-config=bootstrap-lto-lean --enable-link-serialization=2
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 11.2.0 (Ubuntu 11.2.0-19ubuntu1)
COLLECT_GCC_OPTIONS=‘-v’ ‘-save-temps’ ‘-c’ ‘-mtune=generic’ ‘-march=x86-64’
/usr/lib/gcc/x86_64-linux-gnu/11/f951 model.f -ffixed-form -quiet -dumpbase model.f -dumpbase-ext .f -mtune=generic -march=x86-64 -version -fintrinsic-modules-path /usr/lib/gcc/x86_64-linux-gnu/11/finclude -fpre-include=/usr/include/finclude/math-vector-fortran.h -o model.s
GNU Fortran (Ubuntu 11.2.0-19ubuntu1) version 11.2.0 (x86_64-linux-gnu)
compiled by GNU C version 11.2.0, GMP version 6.2.1, MPFR version 4.1.0, MPC version 1.2.1, isl version isl-0.24-GMP
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
GNU Fortran2008 (Ubuntu 11.2.0-19ubuntu1) version 11.2.0 (x86_64-linux-gnu)
compiled by GNU C version 11.2.0, GMP version 6.2.1, MPFR version 4.1.0, MPC version 1.2.1, isl version isl-0.24-GMP
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
gfortran: internal compiler error: Segmentation fault signal terminated program f951
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-11/README.Bugs> for instructions.
(07:36 ian@ian-HP-Stream-Laptop-11-y0XX ~) > gfortran -v -save-temps model2.f -c
Using built-in specs.
COLLECT_GCC=gfortran
OFFLOAD_TARGET_NAMES=nvptx-none:amdgcn-amdhsa
OFFLOAD_TARGET_DEFAULT=1
Target: x86_64-linux-gnu
Configured with: …/src/configure -v --with-pkgversion=‘Ubuntu 11.2.0-19ubuntu1’ --with-bugurl=file:///usr/share/doc/gcc-11/README.Bugs --enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++,m2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-11 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-bootstrap --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-plugin --enable-default-pie --with-system-zlib --enable-libphobos-checking=release --with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch --disable-werror --enable-cet --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none=/build/gcc-11-gBFGDP/gcc-11-11.2.0/debian/tmp-nvptx/usr,amdgcn-amdhsa=/build/gcc-11-gBFGDP/gcc-11-11.2.0/debian/tmp-gcn/usr --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu --with-build-config=bootstrap-lto-lean --enable-link-serialization=2
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 11.2.0 (Ubuntu 11.2.0-19ubuntu1)
COLLECT_GCC_OPTIONS=‘-v’ ‘-save-temps’ ‘-c’ ‘-mtune=generic’ ‘-march=x86-64’
/usr/lib/gcc/x86_64-linux-gnu/11/f951 model2.f -ffixed-form -quiet -dumpbase model2.f -dumpbase-ext .f -mtune=generic -march=x86-64 -version -fintrinsic-modules-path /usr/lib/gcc/x86_64-linux-gnu/11/finclude -fpre-include=/usr/include/finclude/math-vector-fortran.h -o model2.s
GNU Fortran (Ubuntu 11.2.0-19ubuntu1) version 11.2.0 (x86_64-linux-gnu)
compiled by GNU C version 11.2.0, GMP version 6.2.1, MPFR version 4.1.0, MPC version 1.2.1, isl version isl-0.24-GMP
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
GNU Fortran2008 (Ubuntu 11.2.0-19ubuntu1) version 11.2.0 (x86_64-linux-gnu)
compiled by GNU C version 11.2.0, GMP version 6.2.1, MPFR version 4.1.0, MPC version 1.2.1, isl version isl-0.24-GMP
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
COLLECT_GCC_OPTIONS=‘-v’ ‘-save-temps’ ‘-c’ ‘-mtune=generic’ ‘-march=x86-64’
as -v --64 -o model2.o model2.s
GNU assembler version 2.38 (x86_64-linux-gnu) using BFD version (GNU Binutils for Ubuntu) 2.38
COMPILER_PATH=/usr/lib/gcc/x86_64-linux-gnu/11/:/usr/lib/gcc/x86_64-linux-gnu/11/:/usr/lib/gcc/x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/11/:/usr/lib/gcc/x86_64-linux-gnu/
LIBRARY_PATH=/usr/lib/gcc/x86_64-linux-gnu/11/:/usr/lib/gcc/x86_64-linux-gnu/11/…/…/…/x86_64-linux-gnu/:/usr/lib/gcc/x86_64-linux-gnu/11/…/…/…/…/lib/:/lib/x86_64-linux-gnu/:/lib/…/lib/:/usr/lib/x86_64-linux-gnu/:/usr/lib/…/lib/:/usr/lib/gcc/x86_64-linux-gnu/11/…/…/…/:/lib/:/usr/lib/
COLLECT_GCC_OPTIONS=‘-v’ ‘-save-temps’ ‘-c’ ‘-mtune=generic’ ‘-march=x86-64’
(07:36 ian@ian-HP-Stream-Laptop-11-y0XX ~) > gfortran -v -save-temps model.f -c
type or paste code here