
-frealloc-lhs is the default. If -fno-realloc-lhs is specified, then an allocatable on the left side of an intrinsic assignment is not implicitly (re)allocated to conform with the right hand side. Fortran runtime will issue an error if there is a mismatch in shape/type/allocation-status.
12 lines
463 B
Fortran
12 lines
463 B
Fortran
! Check that the driver passes through -f[no-]realloc-lhs:
|
|
! RUN: %flang -### -S -frealloc-lhs %s -o - 2>&1 | FileCheck %s --check-prefix=ON
|
|
! RUN: %flang -### -S -fno-realloc-lhs %s -o - 2>&1 | FileCheck %s --check-prefix=OFF
|
|
|
|
! Check that the compiler accepts -f[no-]realloc-lhs:
|
|
! RUN: %flang_fc1 -emit-hlfir -frealloc-lhs %s -o -
|
|
! RUN: %flang_fc1 -emit-hlfir -fno-realloc-lhs %s -o -
|
|
|
|
! ON: "-fc1"{{.*}}"-frealloc-lhs"
|
|
|
|
! OFF: "-fc1"{{.*}}"-fno-realloc-lhs"
|