Bug 2336140

Summary: GCC 15 mass prebuild: elk: "f951: internal compiler error: in gfc_intrinsic_subroutine_by_id, at fortran/intrinsic.cc:1069"
Product: [Fedora] Fedora Reporter: Dave Malcolm <dmalcolm>
Component: gccAssignee: Jakub Jelinek <jakub>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: rawhideCC: dmalcolm, fweimer, jakub, jlaw, josmyers, jwakely, mcermak, mpolacek, msebor, nickc, nixuser, sipoyare
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2025-01-13 12:30:59 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 2333037    

Description Dave Malcolm 2025-01-07 15:33:00 UTC
Seen on this build:
  https://copr.fedorainfracloud.org/coprs/dmalcolm/gcc-15-smoketest-3.failed/build/8476304/

using gcc-gfortran-15.0.0-0.2.fc42 from this scratch build by Jakub: 
   https://koji.fedoraproject.org/koji/taskinfo?taskID=126495782

gfortran -fopenmp -fallow-argument-mismatch -I/usr/lib64/gfortran/modules -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Wno-complain-wrong-lang -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1  -mbranch-protection=standard -fasynchronous-unwind-tables -fstack-clash-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -c libxcifc.f90
f951: internal compiler error: in gfc_intrinsic_subroutine_by_id, at fortran/intrinsic.cc:1069
Please submit a full bug report, with preprocessed source (by using -freport-bug).
See <http://bugzilla.redhat.com/bugzilla> for instructions.
make[1]: *** [Makefile:220: libxcifc.o] Error 1

The ICE seems to happen on all archs I've tried.

Reproducible: Didn't try

Comment 1 Jakub Jelinek 2025-01-07 16:16:45 UTC
elk uses Fortran module built by libxc package (packaged in libxc-devel).
Wonder if the ICE isn't caused by using libxc-devel built by GCC 14 and libxcifc.f90 compiled by GCC 15.
That said, I get
/home/jakub/src/gcc/obj26/gcc/gfortran -B /home/jakub/src/gcc/obj26/gcc/ -fopenmp -fallow-argument-mismatch -I/usr/lib64/gfortran/modules -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Wno-complain-wrong-lang -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -fasynchronous-unwind-tables -fstack-clash-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer libxcifc.f90 
libxcifc.f90:144:59:

  144 |       if ((id == XC_LDA_XC_KSDT).or.(id == XC_LDA_XC_GDSMFB)) then
      |                                                           1
Error: Symbol ‘xc_lda_xc_gdsmfb’ at (1) has no IMPLICIT type
libxcifc.f90:144:31:

  144 |       if ((id == XC_LDA_XC_KSDT).or.(id == XC_LDA_XC_GDSMFB)) then
      |                               1
Error: Symbol ‘xc_lda_xc_ksdt’ at (1) has no IMPLICIT type
when I try to build it by hand outside of rpm.
Will need to try to build this inside of mock.

Comment 2 Jakub Jelinek 2025-01-13 12:30:59 UTC
This should be fixed in gcc-15.0.0-0.4.fc42.