#1106736 (no subject)

Package:
gfortran
Source:
gfortran
Description:
GNU Fortran 95 compiler
Submitter:
Boud Roukema
Date:
2025-05-28 21:15:01 UTC
Severity:
normal
#1106736#5
Date:
2025-05-28 20:52:20 UTC
From:
To:
Dear Maintainer,

    * What led up to the situation?

I tried to compile cosmdist commit 3ea40c144d [1] from source with
'./configure && make' on my Pinephone.
[1] https://codeberg.org/boud/cosmdist/commit/3ea40c144dc6a5095ce9e46802aacc7c5a41a557

    * What exactly did you do (or not do) that was effective (or
      ineffective)?

My minimal working example [2] is:
--------------------------------------------------
$ cat x.f90

subroutine myfun(i,y)
   integer i
   logical y
   if(i.eq.1)then
      y = .true.
   endif
   return
end subroutine myfun

$ gfortran  -g -O2 -c -o x.o x.f90
--------------------------------------------------

[2] https://paste.debian.net/1377105/

    * What was the outcome of this action?

On repeated tries, the outcome was [3] about
20% of the time:
-------------------------------------------------- during GIMPLE pass: fre x.f90:1:16: # 1 | subroutine myfun(i,y) | ^ internal compiler error: Segmentation fault 0xffffxxxxxxxb __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58 0xffffxxxxxxxb __libc_start_main_impl ../csu/libc-start.c:360 -------------------------------------------------- and another 20% of the time it was the same, but with 'pre' instead of 'fre'. About 60% of the time 'x.o' was created with no reported errors. [3] https://paste.debian.net/1377107/ * What outcome did you expect instead? I expected 'x.o' to have been created with no reported errors. Kernel: Linux 6.12-sunxi64 (SMP w/4 CPU threads) Kernel taint flags: TAINT_CRAP Locale: LANG=C.UTF-8, LC_CTYPE=C.UTF-8 (charmap=UTF-8), LANGUAGE not set Shell: /bin/sh linked to /usr/bin/dash Init: systemd (via /run/systemd/system) Versions of packages gfortran depends on: ii cpp 4:14.2.0-1 ii cpp-aarch64-linux-gnu 4:14.2.0-1 ii gcc 4:14.2.0-1 ii gfortran-14 14.2.0-19 ii gfortran-aarch64-linux-gnu 4:14.2.0-1 gfortran recommends no packages. Versions of packages gfortran suggests: pn gfortran-doc <none> ---------------------------------------------------------------------- Cheers Boud
#1106736#10
Date:
2025-05-28 21:05:57 UTC
From:
To:
hi again,

There's a workaround. On the same system, compiling with


gfortran  -g -O1 -c -o x.o x.f90


gives no error at all on many repeated tries.


For the file

https://codeberg.org/boud/cosmdist/src/branch/main/cosm_f90.f90

on which I discovered the error,

gfortran  -g -O0 -c -o x.o x.f90

is needed to compile with no error on the same system; the
error still often occurs with '-O1'.

Cheers
Boud