public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "sgk at troutmask dot apl.washington.edu" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug libfortran/62188] Array bounds overrun in bessel_yn_r4/8/16 and other functions
Date: Tue, 26 Aug 2014 18:14:00 -0000	[thread overview]
Message-ID: <bug-62188-4-Ie9COI17lj@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-62188-4@http.gcc.gnu.org/bugzilla/>

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.


      parent reply	other threads:[~2014-08-26 18:14 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-19 13:48 [Bug libfortran/62188] New: " vogt at linux dot vnet.ibm.com
2014-08-19 16:54 ` [Bug libfortran/62188] " kargl at gcc dot gnu.org
2014-08-20  7:03 ` vogt at linux dot vnet.ibm.com
2014-08-20 16:19 ` kargl at gcc dot gnu.org
2014-08-20 16:22 ` kargl at gcc dot gnu.org
2014-08-20 16:24 ` kargl at gcc dot gnu.org
2014-08-20 16:30 ` kargl at gcc dot gnu.org
2014-08-26 13:08 ` burnus at gcc dot gnu.org
2014-08-26 14:52 ` sgk at troutmask dot apl.washington.edu
2014-08-26 17:54 ` sgk at troutmask dot apl.washington.edu
2014-08-26 18:14 ` sgk at troutmask dot apl.washington.edu [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-62188-4-Ie9COI17lj@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).