https://gcc.gnu.org/bugzilla/show_bug.cgi?id=129195
Bug ID: 129195
Summary: Segmentation fault for adjustl
Product: gcc
Version: 17.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
Assignee: unassigned at gcc dot gnu.org
Reporter: dcb314 at hotmail dot com
Target Milestone: ---
Created attachment 66356
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=66356&action=edit
f90 source code
For the attached F90 code from llvm testsuite on github.com
with flang:
$ flang -c -w
/home/dcb42/llvm/trunk/flang/test/Lower/HLFIR/elemental-intrinsics.f90
$
With gfortran 16.2.0:
$ ~/gcc/results.16.2.0/bin/gfortran -c -w
/home/dcb42/llvm/trunk/flang/test/Lower/HLFIR/elemental-intrinsics.f90
gfortran: internal compiler error: Segmentation fault signal terminated program
f951
Segmentation fault (core dumped) ~/gcc/results.16.2.0/bin/gfortran -c
-w /home/dcb42/llvm/trunk/flang/test/Lower/HLFIR/elemental-intrinsics.f90
$
Recent trunk gfortran does something similar.
Reduced code seems to be:
subroutine test_adjustl(x)
character(*) x(0)
call bar(adjustl(x))
end