Hi Andre, hi all,

Andre Vehreschild wrote:
I am experiencing a strange issue with gfortran. Compiling a simple program:

$ cat end.f90
end
$ gfortran end.f90 -o end
f951: Fatal Error: Cannot open pre-included file '\xe0\xd4\xf2,'
compilation terminated.

From your description, it sounds as if your Stage 1 compiler
of Fedora 41 is miscompiling gfortran/f951.

I have not understood whether a normal bootstrap, i.e. where
gfortran is only build during Stage 2 also fails or only a
non-bootstrap / --enable-stage1-languages=fortran,... built one.

* * *

Yes, the program is doing nothing, but can not be compiled. The pre-included
file name changes randomly. Looks like something is either overwritten or
not initialized properly. I bisected this issue down to
commit f23bac62f46fc296a4d0526ef54824d406c3756c
Author: John Ericson<[email protected]>
Date:   Fri Aug 22 22:24:56 2025 -0400

     driver: Rework for_each_path using C++

but I do not see, why this should affect gfortran's ability to build a simple
program.

Well, from your valgrind output, the issue is in for_each_path
and 'pre-included' is also run for empty programs - as the name implies
And there is also a
  -fpre-include=/usr/include/finclude/math-vector-fortran.h
in your f951 call, which is used to ensure that GLIBC's vector math
functions are used.

* * *

I don't feel like checking whether there is a bug in
commit r16-3354-gf23bac62f46fc2 itself or only an issue in the F41 system
compiler.

Looking for that hash in Bugzilla does not turn up anything - and my
bootstrap-build GCC works fine as well (valgrind does not stumble over
this issue).

Tobias

Reply via email to