Re: [PATCH] PR fortran/105310 - ICE when UNION is after the 8th field in a DEC STRUCTURE with -finit-derived -finit-local-zero

2022-04-21 Thread Fritz Reese via Gcc-patches
On Wed, Apr 20, 2022, 16:27 Harald Anlauf wrote: > > Hi Fritz, > > Am 20.04.22 um 20:03 schrieb Fritz Reese via Fortran: > > See the bug report at gcc dot gnu dot org/bugzilla/show_bug.cgi?id=105310 . > > OK if you add a/the testcase. .. > > As this affects all branches, you may backport the patch

[PATCH] PR fortran/105310 - ICE when UNION is after the 8th field in a DEC STRUCTURE with -finit-derived -finit-local-zero

2022-04-20 Thread Fritz Reese via Gcc-patches
See the bug report at gcc dot gnu dot org/bugzilla/show_bug.cgi?id=105310 . This code was originally authored by me and the fix is trivial, so I intend to commit the attached patch in the next few days if there is no dissent. The bug is caused by gfc_conv_union_initializer in gcc/fortran/trans-e

[PATCH, libgfortran] Protect the trigd functions in libgfortran from unavailable math functions [PR94586, PR94694]

2020-04-22 Thread Fritz Reese via Gcc-patches
This patch here is a follow-on to Jakub's in his message "[PATCH] libgfortran: Provide some further math library fallbacks [PR94694]" at https://gcc.gnu.org/pipermail/fortran/2020-April/054252.html. I think this should be committed along with Jakub's patch in response to PRs 94586 and 94694. Thoug

Re: [patch, committed] Add numerous symbol attributes to -fdump-fortran-original

2020-04-21 Thread Fritz Reese via Gcc-patches
On Mon, Apr 20, 2020 at 1:25 PM Thomas Koenig via Fortran wrote: > > Hello world, > > after finding myself debug a PR where showing all the attributes > of a symbol would have helped enormously (which I realized only > afterwards), I went ahead and added most of the flags to show_attr, > in the ho

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-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

Re: [patch, fortran] Fix ICE on invalid, PR 94090

2020-04-15 Thread Fritz Reese via Gcc-patches
On Wed, Apr 15, 2020 at 1:47 PM Thomas Koenig wrote: > > Hi Fritz, > > > While you're touching the code anyway, how would you feel about > > replacing the nearby "goto done"s with a chain of "else if"? There's > > really no reason I can see for goto here, since the block following > > the conditio

Re: ICE on wrong code [PR94192] commit

2020-04-15 Thread Fritz Reese via Gcc-patches
On Tue, Apr 14, 2020 at 7:54 AM Linus König wrote: > > Hi all, > > the PR has just recently been committed. Paul gave his offline approval. > I only realized recently, that the NULL pointer check can actually be > ommitted if the check is moved in the code. In the commit however, it is > still rig

Re: [patch, fortran] Fix ICE on invalid, PR 94090

2020-04-15 Thread Fritz Reese via Gcc-patches
> Yes. Looking back at the code, I think it can also be cleaned up > a little - turning the error to warnings is only needed on that > particular branch, and resetting it to the default can also > happen there, and at the target of a goto statement. > > So, here's an updated patch. OK for trunk?

Re: [patch, fortran] Fix ICE on invalid, PR 94090

2020-04-13 Thread Fritz Reese via Gcc-patches
On Mon, Apr 13, 2020 at 10:20 AM Thomas Koenig via Fortran wrote: > > Hello world, > > the attached patch fixes an ICE on invalid: When the return type of > a function was misdeclared with a wrong rank, we issued a warning, > but not an error (unless with -pedantic); later on, an ICE ensued. > > N

Re: ICE on wrong code [PR94192]

2020-04-13 Thread Fritz Reese via Gcc-patches
On Sat, Apr 11, 2020 at 10:27 AM Linus König wrote: > > Hi, > > Here is the patch with some of the null pointer tests removed. > > This is regression-tested. ChangeLog and test case are as in > https://gcc.gnu.org/pipermail/fortran/2020-April/054193.html . Thanks. Sorry I missed the ChangeLog ent

Re: ICE on wrong colde [PR94192]

2020-04-10 Thread Fritz Reese via Gcc-patches
On Fri, Apr 10, 2020 at 8:27 AM Linus König wrote: > > Hi, > > I fixed the style issues. However, omitting the checks for NULL produced > several regressions in my previous tests. > The style looks good. Please share testcases which exhibit the regressions. They will also need to be included in g

Re: [PATCH, Fortran] -- PR fortran/87923 -- fix ICE when resolving I/O tags and simplify io.c

2020-04-10 Thread Fritz Reese via Gcc-patches
On Fri, Apr 10, 2020 at 8:14 AM Rainer Orth wrote: > > Hi Fritz, [...] > one new testcases comes up as UNRESOLVED everywhere: > > +UNRESOLVED: gfortran.dg/asynchronous_5.f03 -O scan-tree-dump-not > original "volatile.*?ivar_noasync" > +UNRESOLVED: gfortran.dg/asynchronous_5.f03 -O scan-t

Re: [PATCH, Fortran] -- PR fortran/87923 -- fix ICE when resolving I/O tags and simplify io.c

2020-04-09 Thread Fritz Reese via Gcc-patches
Tobias, Thanks very much for the review. On Thu, Apr 9, 2020 at 5:21 AM Tobias Burnus wrote: > > Hi, > > On 4/6/20 7:25 PM, Fritz Reese via Fortran wrote: > > > The attached patch fixes PR 87923 while also simplifying the code in > > io.c. > > Thanks for the work, which looks great; it is a bit

Re: [patch,committed] Move gfortran.dg/dec_math_5.f90 to ./ieee/ (was: Re: PATCH -- Fix degree trignometric functions)

2020-04-08 Thread Fritz Reese via Gcc-patches
Andreas, thank you for the report. Tobias, thank you for the fix. --- Fritz Reese On Wed, Apr 8, 2020 at 12:02 PM Tobias Burnus wrote: > > Hi Andreas, > > thanks for the report. In principle, it would be helpful to know on > which target you are running the test case. > > However, I assume that

Re: Fix an ICE found in PR93686

2020-04-07 Thread Fritz Reese via Gcc-patches
On Mon, Apr 6, 2020 at 5:47 PM Steve Kargl wrote: [...] > BTW, if you haven't committed the degree trig functions, > then I think you should to get the fixes in for 10.1. Roger that. --- Fritz

Re: Fix an ICE found in PR93686

2020-04-06 Thread Fritz Reese via Gcc-patches
On Sat, Apr 4, 2020 at 2:58 PM Steve Kargl via Fortran wrote: > > This patch fixes the ICE found in PR93686. > > > Index: gcc/fortran/decl.c > === > --- gcc/fortran/decl.c (revision 280157) > +++ gcc/fortran/decl.c (working copy) >

[PATCH, Fortran] -- PR fortran/87923 -- fix ICE when resolving I/O tags and simplify io.c

2020-04-06 Thread Fritz Reese via Gcc-patches
All, The attached patch fixes PR 87923 while also simplifying the code in io.c. I do say this patch simplifies io.c because it is true. This patch causes more deletions than insertions to the file -- a rare sight: gcc/fortran/io.c | 859 --- 1

Re: ICE on wrong code [PR94192]

2020-04-06 Thread Fritz Reese via Gcc-patches
On Mon, Apr 6, 2020 at 8:51 AM Linus König wrote: > > Hi all, > > I'm new to gcc and this is my first patch. The idea is not have another > resolution of a pointer if an error has occurred previously. I hope this > meets all the criteria for a patch. In case anything is missing or > wrong, I'm ope

Re: PING -- [PATCH, fortran] PR 85982 -- ICE in resolve_component

2020-04-02 Thread Fritz Reese via Gcc-patches
Tobias, Thank you for the information. I didn't think about translations. I'll post a new version and commit shortly. Cheers, Fritz On Thu, Apr 2, 2020 at 3:50 AM Tobias Burnus wrote: > > In principle, I like the patch. However, I think one should > replace > > gfc_error ("Attribute at %L is n

Re: PING -- [PATCH, fortran] PR 85982 -- ICE in resolve_component

2020-04-01 Thread Fritz Reese via Gcc-patches
On Wed, Apr 1, 2020 at 1:19 PM Fritz Reese wrote: [...] > is still good. Is this OK to commit to trunk and for backport? I'd > like to port as far back as 7. I realized 7 branch is closed. I would backport to 8. > gcc/testsuite/ChangeLog: > 2020-04-01 Fritz Reese > >PR fortran/85982 >

PING -- [PATCH, fortran] PR 85982 -- ICE in resolve_component

2020-04-01 Thread Fritz Reese via Gcc-patches
This simple patch was submitted some time ago (over 1 year), but got lost without review. I have lately rebased and tested, and the patch is still good. Is this OK to commit to trunk and for backport? I'd like to port as far back as 7. --- Fritz Reese gcc/ChangeLog: 2020-04-01 Fritz Reese

Re: [Patch, fortran] PR93833 - [8/9/10 Regression] ICE in trans_array_constructor, at fortran/trans-array.c:2566

2020-04-01 Thread Fritz Reese via Gcc-patches
Unfortunately the mailing list stripped off this attachment so we do not have a chance to review. As attachments appear to be working lately, please resubmit this patch. Fritz On Sun, Mar 8, 2020 at 8:58 AM Paul Richard Thomas wrote: > > This is yet another case, where a deferred character lengt

Re: PATCH -- Fix degree trignometric functions

2020-03-31 Thread Fritz Reese via Gcc-patches
On Fri, Mar 27, 2020 at 7:36 PM Fritz Reese wrote: > > On Fri, Mar 6, 2020 at 6:18 PM Steve Kargl > wrote: > [...] > > TL;DR version. > > > > Fix the simplification and handling of the degree trigonometric functions. > > This includes fixing a number of ICEs. See PR 93871. > > An updated ver

Re: PATCH -- Fix degree trignometric functions

2020-03-30 Thread Fritz Reese via Gcc-patches
On Mon, Mar 30, 2020 at 4:53 PM Tobias Burnus wrote: > > Hi Fritz, > > On 3/30/20 10:20 PM, Fritz Reese via Fortran wrote: > > >>> * All included files need dependency; I do not quickly > >>>see whether that' the case. > > If one looks at the build, the dependency is automatically > obtained a

Re: PATCH -- Fix degree trignometric functions

2020-03-30 Thread Fritz Reese via Gcc-patches
On Sat, Mar 28, 2020 at 12:37 PM Steve Kargl wrote: > > On Sat, Mar 28, 2020 at 08:10:38AM +0100, Tobias Burnus wrote: > > Two remarks: > > > > * As the file trigd_lib.inc is shared between libgfortran > > and gcc/fortran, I wonder whether it should be placed > > under include/ (under the GCC

Re: PATCH -- Fix degree trignometric functions

2020-03-27 Thread Fritz Reese via Gcc-patches
On Fri, Mar 6, 2020 at 6:18 PM Steve Kargl wrote: [...] > TL;DR version. > > Fix the simplification and handling of the degree trigonometric functions. > This includes fixing a number of ICEs. See PR 93871. An updated version of the patch is attached. Regression tests (and new test cases) ar