public inbox for fortran@gcc.gnu.org
 help / color / mirror / Atom feed
From: Paul Richard Thomas <paul.richard.thomas@gmail.com>
To: Steve Kargl <sgk@troutmask.apl.washington.edu>
Cc: "fortran@gcc.gnu.org" <fortran@gcc.gnu.org>,
	gcc-patches <gcc-patches@gcc.gnu.org>
Subject: Re: Simplification and a zero sized array
Date: Sat, 03 Mar 2018 17:07:00 -0000	[thread overview]
Message-ID: <CAGkQGiKBjysdR4A9fPftXUxCvoAw91bfwTZfGFFdRDhfnrRsKw@mail.gmail.com> (raw)
In-Reply-To: <20180303020155.GA93328@troutmask.apl.washington.edu>

Hi Steve,

This looks to be OK to commit.

Thanks

Paul


On 3 March 2018 at 02:01, Steve Kargl <sgk@troutmask.apl.washington.edu> wrote:
> All,
>
> I would like to commit the attach patch, which fixes
> a number of ICE's when simplification runs into a
> size zero array.  gfortran does not have a nice
> easy way to determine if an array is size zero.  Thus,
> the new function is_size_zero_array was written after
> staring at several gdb sessions.
>
> This patch does not fix all of the problems with
> size zero arrays:
>
> 1) findloc isn't implemented, so obviously it's not fixed.
> 2) I skipped looking at minloc and maxloc.  These will take
>    more effort.
> 3) I skipped looking at associated.  There are special
>    conditions with size zero arrays mentioned, but I
>    haven't tried to cause an ICE, yet.
> 4) The pad dummy argument to the spread has special condition
>    when she is size zero.  I haven't tried to cause an
>    ICE, yet.
>
> 5) minval and maxval can take a size zero array of strings.
>    The requirements will call for someone with widechar
>    gfortran hacking experience to fix.  At the moment,
>    gfortran will issue an error and die.  So, anyone game
>    in handling the widechar stuff?
>
> 6) I haven't looked at any of the old g77 compatibility
>    functions.  These may (or may not!) have issues.
>
> Regression tested on x86_64-*-freebsd.  OK to commit?
>
>
> 2018-03-02  Steven G. Kargl  <kargl@gcc.gnu.org>
>
>         PR fortran/66128
>         * simplify.c (is_size_zero_array): New function to check for size
>         zero array.
>         (gfc_simplify_all, gfc_simplify_any, gfc_simplify_count,
>          gfc_simplify_iall, gfc_simplify_iany, gfc_simplify_iparity,
>          gfc_simplify_minval, gfc_simplify_maxval, gfc_simplify_norm2,
>          gfc_simplify_product, gfc_simplify_sum): Use it, and implement
>         requirements from F2018.
>
> 2018-03-02  Steven G. Kargl  <kargl@gcc.gnu.org>
>
>         PR fortran/66128
>
>         * gfortran.dg/zero_sized_8.f90: New test.
>
>
>
> --
> Steve



-- 
"If you can't explain it simply, you don't understand it well enough"
- Albert Einstein

      reply	other threads:[~2018-03-03 17:07 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-03  2:02 Steve Kargl
2018-03-03 17:07 ` Paul Richard Thomas [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=CAGkQGiKBjysdR4A9fPftXUxCvoAw91bfwTZfGFFdRDhfnrRsKw@mail.gmail.com \
    --to=paul.richard.thomas@gmail.com \
    --cc=fortran@gcc.gnu.org \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=sgk@troutmask.apl.washington.edu \
    /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).