Re: [patch, fortran] Fix PR PR93500

2020-04-17 Thread Fritz Reese via Gcc-patches
On Fri, Apr 17, 2020 at 10:33 AM Thomas Koenig wrote: > > Hi Fritz, > > > First, it appears if simplify_bound_dim returns &gfc_bad_expr (and a > > div/0 occurs) then this code will free &gfc_bad_expr. I'm not sure > > whether or not that can actually occur, but it is certainly incorrect, > > since

Re: [patch, fortran] Fix PR PR93500

2020-04-17 Thread Thomas Koenig via Gcc-patches
Hi Fritz, First, it appears if simplify_bound_dim returns &gfc_bad_expr (and a div/0 occurs) then this code will free &gfc_bad_expr. I'm not sure whether or not that can actually occur, but it is certainly incorrect, since &gfc_bad_expr points to static storage. The only other possible case is b

Re: [patch, fortran] Fix PR PR93500

2020-04-16 Thread Fritz Reese via Gcc-patches
On Thu, Apr 16, 2020 at 7:53 AM Thomas Koenig via Fortran wrote: > > Hello world, > > this patch fixes PR PR93500. One part of it is due to > what Steve wrote in the patch (returning from resolutions when both > operands are NULL), but that still left a nonsensical error. > Returning &gfc_bad_exp

[patch, fortran] Fix PR PR93500

2020-04-16 Thread Thomas Koenig via Gcc-patches
Hello world, this patch fixes PR PR93500. One part of it is due to what Steve wrote in the patch (returning from resolutions when both operands are NULL), but that still left a nonsensical error. Returning &gfc_bad_expr when simplifying bounds resulted in the division by zero error actually reac