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

            Bug ID: 102826
           Summary: Glibc "--disable-mathvec" configure option fail to
                    disable traces to libmvec
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: haochen.jiang at intel dot com
  Target Milestone: ---

When I build Glibc with "--disable-mathvec" and run through this simple
testcase: 

program test_overloaded_intrinsic
  real(4) :: x4(3200), y4(3200)
  real(8) :: x8(3200), y8(3200)

  y4 = sin(x4)
  print *, y4
end

It reports error: undefined reference to `_ZGVeN8v_sin'

It is trying to find libmvec functions, while because of the disabling,
libmvec.so will not be generated.

When I go through gcc file. In gcc/config/gnu-user.h Line 156, we have:

#undef TARGET_F951_OPTIONS
#define TARGET_F951_OPTIONS "%{!nostdinc:\
  %:fortran-preinclude-file(-fpre-include= math-vector-fortran.h finclude%s/)}"

, which is maybe the cause of the error. Because when I clear that
math-vector-fortran.h, the testcase will pass.

Reply via email to