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

            Bug ID: 101820
           Summary: fatal error: ISO_Fortran_binding.h: No such file or
                    directory
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libfortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: ubizjak at gmail dot com
  Target Milestone: ---

There are quite some FAILs in the gfortran testsuite, e.g.:

FAIL: gfortran.dg/ISO_Fortran_binding_1.f90   -O0  (test for excess errors)
FAIL: gfortran.dg/ISO_Fortran_binding_1.f90   -O1  (test for excess errors)
FAIL: gfortran.dg/ISO_Fortran_binding_1.f90   -O2  (test for excess errors)
FAIL: gfortran.dg/ISO_Fortran_binding_1.f90   -O3 -fomit-frame-pointer
-funroll-loops -fpeel-loops -ftracer -finline-functions  (test for excess
errors)
FAIL: gfortran.dg/ISO_Fortran_binding_1.f90   -O3 -g  (test for excess errors)
FAIL: gfortran.dg/ISO_Fortran_binding_1.f90   -Os  (test for excess errors)
...

where:

/home/uros/git/gcc/gcc/testsuite/gfortran.dg/ISO_Fortran_binding_1.c:3:10:
fatal error: ISO_Fortran_binding.h: No such file or directory
compilation terminated.
compiler exited with status 1
FAIL: gfortran.dg/ISO_Fortran_binding_1.f90   -O3 -g  (test for excess errors)
Excess errors:
/home/uros/git/gcc/gcc/testsuite/gfortran.dg/ISO_Fortran_binding_1.c:3:10:
fatal error: ISO_Fortran_binding.h: No such file or directory
compilation terminated.

UNRESOLVED: gfortran.dg/ISO_Fortran_binding_1.f90   -O3 -g  compilation failed
to produce executable


The file ISO_Fortran_binding.h is present in the libgfortran build directory,
but it looks to me that -I is missing when building the testcase:

/home/uros/gcc-build/gcc/testsuite/gfortran/../../gfortran
-B/home/uros/gcc-build/gcc/testsuite/gfortran/../../
-B/home/uros/gcc-build/x86_64-pc-linux-gnu/./libgfortran/
/home/uros/git/gcc/gcc/testsuite/gfortran.dg/ISO_Fortran_binding_1.f90
-fdiagnostics-plain-output -fdiagnostics-plain-output -O3 -g -pedantic-errors
/home/uros/git/gcc/gcc/testsuite/gfortran.dg/ISO_Fortran_binding_1.c -dumpbase 
-B/home/uros/gcc-build/x86_64-pc-linux-gnu/./libgfortran/.libs
-L/home/uros/gcc-build/x86_64-pc-linux-gnu/./libgfortran/.libs
-L/home/uros/gcc-build/x86_64-pc-linux-gnu/./libgfortran/.libs
-L/home/uros/gcc-build/x86_64-pc-linux-gnu/./libatomic/.libs
-B/home/uros/gcc-build/x86_64-pc-linux-gnu/./libquadmath/.libs
-L/home/uros/gcc-build/x86_64-pc-linux-gnu/./libquadmath/.libs
-L/home/uros/gcc-build/x86_64-pc-linux-gnu/./libquadmath/.libs -lm -o
./ISO_Fortran_binding_1.exe
/home/uros/git/gcc/gcc/testsuite/gfortran.dg/ISO_Fortran_binding_1.c:3:10:
fatal error: ISO_Fortran_binding.h: No such file or directory
compilation terminated.

Adding "-I/home/uros/gcc-build/x86_64-pc-linux-gnu/libgfortran" to the above
command fixes the compilation.

Reply via email to