https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114781
Bug ID: 114781
Summary: Error in ALLOCATE with MOLD=
Product: gcc
Version: 13.2.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
Assignee: unassigned at gcc dot gnu.org
Reporter: dcesari69 at gmail dot com
Target Milestone: ---
Created attachment 57990
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=57990&action=edit
Failing program
Allocation af an unlimited polymorphic array with MOLD= after a MOVE_ALLOC
fails with an unrealistic allocation size. With slight modifications to the
code the error disappears (see comments in the code itself). The code is
attached. The distribution is a Fedora 38.
# gfortran -g -o mold_test mold_test.f90
# ./mold_test
In file 'mold_test.f90', around line 13: Error allocating 1118068033978368
bytes: Cannot allocate memory
Error termination. Backtrace:
#0 0x7f1c5dc23872 in ???
#1 0x7f1c5dc24379 in ???
#2 0x7f1c5dc246bf in ???
#3 0x401669 in __mold_test_mo_MOD_aalloc
at /home/[email protected]/mold_test.f90:12
#4 0x40195b in mold_test
at /home/[email protected]/mold_test.f90:25
#5 0x401992 in main
at /home/[email protected]/mold_test.f90:23
# gfortran --version
GNU Fortran (GCC) 13.2.1 20240316 (Red Hat 13.2.1-7)
Copyright (C) 2023 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.