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

            Bug ID: 94246
           Summary: valgrind error for ./gfortran.dg/bessel_5.f90
           Product: gcc
           Version: 10.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: dcb314 at hotmail dot com
  Target Milestone: ---

I just tried a valgrind version of recent trunk gfortran over testsuite file
gfortran.dg/bessel_5.f90.

I got

$ /home/dcb/gcc/results.20200320.valgrind/bin/gfortran -c
./gfortran.dg/bessel_5.f90
./gfortran.dg/bessel_5.f90:64:50:

   64 | if (any (BESSEL_YN(0, 10, 0.0) /= [ (BESSEL_YN(i, 0.0), i = 0, 10) ]))
&
      |                                                  1
Error: Result of BESSEL_YN overflows its kind at (1)
./gfortran.dg/bessel_5.f90:64:26:

   64 | if (any (BESSEL_YN(0, 10, 0.0) /= [ (BESSEL_YN(i, 0.0), i = 0, 10) ]))
&
      |                          1
Error: Result of BESSEL_YN is -INF at (1)
==1776287== Invalid read of size 8
==1776287==    at 0x603913: reduce_binary_ac(arith (*)(gfc_expr*, gfc_expr*,
gfc_expr**), gfc_expr*, gfc_expr*, gfc_expr**) (arith.c:1325)
==1776287==    by 0x60397A: reduce_binary_ac(arith (*)(gfc_expr*, gfc_expr*,
gfc_expr**), gfc_expr*, gfc_expr*, gfc_expr**) (arith.c:1312)
==1776287==    by 0x603B34: reduce_binary(arith (*)(gfc_expr*, gfc_expr*,
gfc_expr**), gfc_expr*, gfc_expr*, gfc_expr**) (arith.c:1438)
==1776287==    by 0x603F72: eval_intrinsic(gfc_intrinsic_op, eval_f, gfc_expr*,
gfc_expr*) (arith.c:1613)

Please note I didn't use the recommended testsuite flags of
-Wall -fno-range-check.

Also, since this valgrind error occurs after gfortran finds an
error in the user's source code, it doesn't look very important to me.

Reply via email to