#1107136 gfortran: 14.2.0-1 internal compiler error on arm64/PinePhone with -W(maybe-)uninitialized

Package:
gfortran
Source:
gfortran
Description:
GNU Fortran 95 compiler
Submitter:
Boud Roukema
Date:
2025-06-02 00:05:01 UTC
Severity:
normal
#1107136#5
Date:
2025-06-01 23:11:09 UTC
From:
To:
Dear Maintainer,

    * What led up to the situation?

I tried to compile some fortran source files on my Pinephone,
including the '-Wall' compiler option.

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

My minimal working example is:
--------------------------------------------------
$ cat mwe.f90
function myfunc(xnew) result(ynew)
   real, intent(in) :: xnew(:)
   real :: ynew
   integer :: i
   if(size(xnew).ge.1)then
      ynew = xnew(1)
   endif
end function

$ gfortran -c -Wuninitialized mwe.f90 -o mwe.o ; \
   gfortran -c -Wmaybe-uninitialized mwe.f90 -o mwe.o
--------------------------------------------------



    * What was the outcome of this action?

Every repeat gave the same result:
-------------------------------------------------- during GIMPLE pass: early_uninit mwe.f90:8:12: 8 | end function | ^ internal compiler error: Segmentation fault 0xffffxxxx229b __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58 0xffffxxxx237b __libc_start_main_impl ../csu/libc-start.c:360 Please submit a full bug report, with preprocessed source (by using -freport-bug). Please include the complete backtrace with any bug report. See <file:///usr/share/doc/gcc-14/README.Bugs> for instructions. during GIMPLE pass: early_uninit mwe.f90:8:12: 8 | end function | ^ internal compiler error: Segmentation fault 0xffffxxxx229b __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58 0xffffxxxx237b __libc_start_main_impl ../csu/libc-start.c:360 Please submit a full bug report, with preprocessed source (by using -freport-bug). Please include the complete backtrace with any bug report. See <file:///usr/share/doc/gcc-14/README.Bugs> for instructions.
-------------------------------------------------- * What outcome did you expect instead? I expected 'mwe.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> ---------------------------------------------------------------------- Possibly related: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1106736 (I forgot to put a 'Subject' for that bug, sorry). Cheers Boud
#1107136#10
Date:
2025-06-01 23:55:34 UTC
From:
To:
hi again,

Here's an alternative minimal working example:
---------------------------------------------------------------------- $ cat mwe2.f90 integer function f(x) real, intent(in) :: x(:) f = size(x) end function $ gfortran -c -Wuninitialized mwe2.f90 -o mwe2.o during GIMPLE pass: early_uninit mwe2.f90:4:12: 4 | end function | ^ internal compiler error: Segmentation fault 0xffffxxxx229b __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58 0xffffxxxx237b __libc_start_main_impl ../csu/libc-start.c:360 Please submit a full bug report, with preprocessed source (by using -freport-bug). Please include the complete backtrace with any bug report. See <file:///usr/share/doc/gcc-14/README.Bugs> for instructions. ---------------------------------------------------------------------- and the same with '-Wmaybe-uninitialized'. Cheers Boud