Bug#1111845: gfortran: compiling this code will cause an internal compiler error
Package: gfortran
Version: 4:12.2.0-3
Severity: important
X-Debbugs-Cc: RLOnm5T2p2hM@protonmail.com
Dear Maintainer,
Compiling the file attached leads to an internal compiler error.
The error only appears when the variable sizeA is set to 1e5 and
above (could be a more specific value inbetween 1e4 and 1e5). When
under this value, the code will compile and run with no error, but,
the code will take an absurde amount of time to compile when sizeA
is set to 1e4. When set under 1e5, the code works as intended.
The error only happens when the variable x is written as :
x = real([(i, i = 1, sizeA)])
if instead it is written as :
x = [(real(i), i = 1, sizeA)]
there will be nore internal compiler error and the time to compile will
be very quick.
the code is compiled using only gfortran and no other flags
-- System Information:
Debian Release: 12.11
APT prefers oldstable-security
APT policy: (500, 'oldstable-security'), (500, 'oldstable')
Architecture: amd64 (x86_64)
Kernel: Linux 6.12.39-1.qubes.fc37.x86_64 (SMP w/6 CPU threads; PREEMPT)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
Versions of packages gfortran depends on:
ii cpp 4:12.2.0-3
ii gcc 4:12.2.0-3
ii gfortran-12 12.2.0-14+deb12u1
gfortran recommends no packages.
Versions of packages gfortran suggests:
pn gfortran-doc <none>
pn gfortran-multilib <none>
-- no debconf information
program main
implicit none
integer :: i, j, k
integer, parameter :: sizeA = 1e5
real, dimension(sizeA) :: x
x = real([( i,i = 1, sizeA )])
print*, x
end program main
Reply to: