[Bug libfortran/62188] Array bounds overrun in bessel_yn_r4/8/16 and other functions
sgk at troutmask dot apl.washington.edu
gcc-bugzilla@gcc.gnu.org
Tue Aug 26 18:14:00 GMT 2014
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62188
--- Comment #11 from Steve Kargl <sgk at troutmask dot apl.washington.edu> ---
On Tue, Aug 26, 2014 at 10:53:58AM -0700, Steve Kargl wrote:
> On Tue, Aug 26, 2014 at 07:51:45AM -0700, Steve Kargl wrote:
> > On Tue, Aug 26, 2014 at 01:08:22PM +0000, burnus at gcc dot gnu.org wrote:
> > >
> > > Steve, should we also add a test case for the "n1 < 0"?
> > >
> >
>
> Checking in general looks broken for bessel_yn and probably _jn.
>
I'm going to have to re-learn the internals of the intrinsics stuff.
>From intrinsic.c, we have
add_sym_2 ("besjn", GFC_ISYM_JN, CLASS_ELEMENTAL, ACTUAL_NO, BT_REAL, dr,
GFC_STD_GNU,
gfc_check_besn, gfc_simplify_bessel_jn, gfc_resolve_besn,
n, BT_INTEGER, di, REQUIRED, x, BT_REAL, dr, REQUIRED);
make_alias ("bessel_jn", GFC_STD_F2008);
add_sym_2 ("dbesjn", GFC_ISYM_JN, CLASS_ELEMENTAL, ACTUAL_NO, BT_REAL, dd,
GFC_STD_GNU,
gfc_check_besn, gfc_simplify_bessel_jn, gfc_resolve_besn,
n, BT_INTEGER, di, REQUIRED, x, BT_REAL, dd, REQUIRED);
add_sym_3 ("bessel_jn", GFC_ISYM_JN2, CLASS_TRANSFORMATIONAL, ACTUAL_NO,
BT_REAL, dr, GFC_STD_F2008,
gfc_check_bessel_n2, gfc_simplify_bessel_jn2,
gfc_resolve_bessel_n2,
"n1", BT_INTEGER, di, REQUIRED,"n2", BT_INTEGER, di, REQUIRED,
x, BT_REAL, dr, REQUIRED);
set_attr_value (3, true, true, true);
make_generic ("bessel_jn", GFC_ISYM_JN, GFC_STD_F2008);
I don't see how bessel_jn can be made an alias to besjn (an entity with
2 args), and then a few lines later it is defined with 3 args and made
generic? I think besjn and bessel_jn need to be dealt with separately
with "n2" in bessel_jn set as OPTIONAL.
More information about the Gcc-bugs
mailing list