https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87908

anlauf at gcc dot gnu.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|FIXED                       |---
                 CC|                            |anlauf at gcc dot gnu.org
             Status|RESOLVED                    |REOPENED

--- Comment #8 from anlauf at gcc dot gnu.org ---
Paul,

the new testcase ICEs for me, and also on some platforms in the testsuite.
E.g.:

https://gcc.gnu.org/pipermail/gcc-testresults/2025-September/858254.html

FAIL: gfortran.dg/pr87908.f90   -O0  (internal compiler error: Segmentation
fault)
FAIL: gfortran.dg/pr87908.f90   -O0  (test for excess errors)
UNRESOLVED: gfortran.dg/pr87908.f90   -O0  compilation failed to produce
executable
FAIL: gfortran.dg/pr87908.f90   -O1  (internal compiler error: Segmentation
fault)
FAIL: gfortran.dg/pr87908.f90   -O1  (test for excess errors)
UNRESOLVED: gfortran.dg/pr87908.f90   -O1  compilation failed to produce
executable
FAIL: gfortran.dg/pr87908.f90   -O2  (internal compiler error: Segmentation
fault)
FAIL: gfortran.dg/pr87908.f90   -O2  (test for excess errors)
UNRESOLVED: gfortran.dg/pr87908.f90   -O2  compilation failed to produce
executable
FAIL: gfortran.dg/pr87908.f90   -O3 -fomit-frame-pointer -funroll-loops
-fpeel-loops -ftracer -finline-functions  (internal compiler error:
Segmentation fault)
FAIL: gfortran.dg/pr87908.f90   -O3 -fomit-frame-pointer -funroll-loops
-fpeel-loops -ftracer -finline-functions  (test for excess errors)
UNRESOLVED: gfortran.dg/pr87908.f90   -O3 -fomit-frame-pointer -funroll-loops
-fpeel-loops -ftracer -finline-functions  compilation failed to produce
executable
FAIL: gfortran.dg/pr87908.f90   -Os  (test for excess errors)
UNRESOLVED: gfortran.dg/pr87908.f90   -Os  compilation failed to produce
executable


Running f95 locally under valgrind, I get an invalid read in the new code:

==31732== Invalid read of size 1
==31732==    at 0xA52202: check_interface0(gfc_interface*, char const*)
(interface.cc:1993)
==31732==    by 0xA5672C: check_sym_interfaces(gfc_symbol*) (interface.cc:2155)
==31732==    by 0xB05D72: do_traverse_symtree(gfc_symtree*, void
(*)(gfc_symtree*), void (*)(gfc_symbol*)) (symbol.cc:4351)
==31732==    by 0xA57BB9: gfc_check_interfaces(gfc_namespace*)
(interface.cc:2266)
==31732==    by 0xAEAC0F: resolve_types(gfc_namespace*) (resolve.cc:19776)
==31732==    by 0xAEABE7: resolve_types(gfc_namespace*) (resolve.cc:19771)
==31732==    by 0xAD81A0: gfc_resolve(gfc_namespace*) [clone .part.0]
(resolve.cc:19877)
==31732==    by 0xAC467B: gfc_parse_file() (parse.cc:7691)
==31732==    by 0xB1F53F: gfc_be_parse_file() (f95-lang.cc:247)
==31732==    by 0x120442D: compile_file() (toplev.cc:453)
==31732==    by 0x9FC94A: do_compile (toplev.cc:2222)
==31732==    by 0x9FC94A: toplev::main(int, char**) (toplev.cc:2385)
==31732==    by 0x9FE2CD: main (main.cc:39)
...

where the first invalid read points to

      if (p->sym->attr.vtab)

Do you have additional local changes to your sources that were not pushed?

Reply via email to