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

[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
ference, matching the signature of vec_safe_push from within the CONSTRUCTOR_APPEND_ELT macro. -- Fritz Reese diff --git a/gcc/fortran/trans-expr.cc b/gcc/fortran/trans-expr.cc index 06713f24f95..8677a3b0b20 100644 --- a/gcc/fortran/trans-expr.cc +++ b/gcc/fortran/trans-expr.

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

2020-04-22 Thread Fritz Reese via Gcc-patches
Jakub has OK'd the patch and I recently authored the original trigd code being modified here. After his patch is committed I will commit this one unless others have comments or concerns. libgfortran/ChangeLog: 2020-04-22 Fritz Reese * intrinsics/trigd.c, intrinsics/trigd_lib.inc, intr

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

2020-04-21 Thread Fritz Reese via Gcc-patches
ting that > the compiler still compiles :-) > > Regards > > Thomas > > 2020-04-20 Thomas Koenig > > * dump-parse-tree.c (show_attr): Add numerous flags, some cleanup. Thanks!! I've always thought these should be handled. --- Fritz Reese

Re: [patch, fortran] Fix PR PR93500

2020-04-17 Thread Fritz Reese via Gcc-patches
d be fixed one day. However! That is not a problem for this PR, nor for stage 4, and is certainly no fault of this patch. Therefore the patch looks OK to me for now. Thank you for your work! --- Fritz Reese

Re: [patch, fortran] Fix PR PR93500

2020-04-16 Thread Fritz Reese via Gcc-patches
upper, gcc_assert (as); if (!gfc_resolve_array_spec (as, 0)) -return NULL; +{ + gfc_free_expr (result); + if (gfc_seen_div0) + return &gfc_bad_expr; + else + return NULL; +} /* The last dimension of an assumed-size array is special. */ if ((!coarray &

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
bal_procedure (gfc_symbol *sym, locus *where, int sub) gfc_error ("Interface mismatch in global procedure %qs at %L: %s", sym->name, &sym->declared_at, reason); gfc_errors_to_warnings (false); - goto done; } } -done: - if (gsym->ty

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

2020-04-13 Thread Fritz Reese via Gcc-patches
n); + if (bad_result_characteristics) + gfc_errors_to_warnings (false); + gfc_error ("Interface mismatch in global procedure %qs at %L:" + " %s", sym->name, &sym->declared_at, reason); goto done; } } Otherwise LGTM, thanks for the fix. --- Fritz Reese

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
. */ + array_sym = array->symtree->n.sym; + if (!array_sym || array_sym->error) +return NULL; + /* Follow any component references. */ - as = array->symtree->n.sym->as; + as = array_sym->as; for (ref = array->ref; ref; ref = ref->next) { switch (ref->type) --- Fritz Reese

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 wor

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

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
ones. OK for master? commit 5a403f4e8e77123994ca1ed05e8f10877423fe55 Author: Fritz Reese Date: Mon Apr 6 12:13:48 2020 -0400 Fix fortran/87923 -- ICE(s) when resolving I/O tags. 2020-04-06 Fritz Reese This patch also reorganizes I/O checking code. Checks which were done in

Re: ICE on wrong code [PR94192]

2020-04-06 Thread Fritz Reese via Gcc-patches
+ /* Do not attempt to resolve if error has already been issued. */ + array_sym = array->symtree->n.sym; + if (array_sym->error) +return NULL; + /* Follow any component references. */ - as = array->symtree->n.sym->as; + as = array_sym->as; for (ref = array->ref; ref; ref = ref->next) { switch (ref->type) Thanks again for your patch. --- Fritz Reese

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

2020-04-02 Thread Fritz Reese via Gcc-patches
t; gender of 'definition' dominates in the cases I checked.) > (b) For TYPE, the string won't change such that the existing translations > still work – even if the update for STRUCTURE won't make it for the release. > > Otherwise it looks good to me, including the test c

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

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

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

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

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
mpfr_clear (ninety); + + /* Find tand. */ + gfc_intrinsic_map_t *m = gfc_intrinsic_map; + for (; m->id != GFC_ISYM_NONE || m->double_built_in != END_BUILTINS; m++) +if (GFC_ISYM_TAND == m->id) + break; + + tree tand = gfc_get_intrinsic_lib_fndecl (m, expr); + tand = build_ca

Re: PATCH -- Fix degree trignometric functions

2020-03-09 Thread Fritz Reese
values. Modifications are so easy even a lurker can do > them. ... extend the patch to include these changes (unless someone enthusiastic gets around to these mods before I do). I should be able to start on this next week (around 16 March). --- Fritz Reese

Re: [PATCH, Fortran] pad char to int conversions with spaces instead of zeros (legacy)

2018-12-10 Thread Fritz Reese
> On Mon, Dec 10, 2018 at 02:09:50PM +, Mark Eggleston wrote: > > > > On 06/12/2018 10:20, Mark Eggleston wrote: > > > > Yes. Mark, you'll need to also patch iresolve.c (gfc_resolve_transfer) > > > > to affect non-constant resolution. > > > Thanks for the hint. > > > > I've looked at gfc_resolv

Re: Fortran patches

2018-12-06 Thread Fritz Reese
On Wed, Dec 5, 2018 at 7:03 PM Steve Kargl wrote: > > On Wed, Dec 05, 2018 at 04:48:28PM -0500, Fritz Reese wrote: [...] > > RE: > > > PR fortran/88228 > > > * expr.c (check_null, check_elemental): Work around -fdec and > > > initiali

Re: Fortran patches

2018-12-05 Thread Fritz Reese
On Wed, Dec 5, 2018 at 12:00 AM Steve Kargl wrote: > > I intend to commit the attached patch on Saturday. Thanks for the work. I assume the patch bootstraps and passes regression tests? RE: > PR fortran/88228 > * expr.c (check_null, check_elemental): Work around -fdec and >

Re: [PATCH, Fortran] pad char to int conversions with spaces instead of zeros (legacy)

2018-12-04 Thread Fritz Reese
On Tue, Dec 4, 2018 at 10:12 AM Jakub Jelinek wrote: > > Just a couple of random comments. > -fdec-pad-with-spaces option name doesn't look right, because it doesn't say > what the option affects. So perhaps have transfer in the option name? [...] > Wouldn't it be better to allow specifying whate

Re: PR fortran/87919 patch for -fno-dec-structure

2018-12-03 Thread Fritz Reese
On Mon, Dec 3, 2018 at 12:12 PM Jakub Jelinek wrote: > > On Mon, Dec 03, 2018 at 04:58:51PM +0100, Jakub Jelinek wrote: > > > but I just committed r266745 adjusted for -fdec-include. > > > > Thanks, though it seems what you've committed in options.c is incomplete. > > In the patch you've posted ea

Re: PR fortran/87919 patch for -fno-dec-structure

2018-12-03 Thread Fritz Reese
> I think more than enough time passed, do you plan to commit to trunk now? > Note, small adjustment will be needed for the addition of flag_dec_include > in set_dec_flags. Jakub- Sorry, yes. I've had other priorities the past few weeks here, but I just committed r266745 adjusted for -fdec-include

Re: [PATCH] Fortran include line fixes and -fdec-include support

2018-11-12 Thread Fritz Reese
On Mon, Nov 12, 2018 at 9:51 AM Jakub Jelinek wrote: > > In fortran97.pdf I read: > "Except in a character context, blanks are insignificant and may be used > freely throughout the program." > and while we handle that in most cases, we don't allow spaces in INCLUDE > lines in fixed form, while e.

Re: PR fortran/87919 patch for -fno-dec-structure

2018-11-12 Thread Fritz Reese
On Mon, Nov 12, 2018 at 3:42 PM Jakub Jelinek wrote: > Ok, so I'll ack it for trunk now, but please give the other Fortran > maintainers one day to disagree before committing. > For the release branches, I'd wait two weeks or so before backporting it. > Roger that. I'll happily give it some time.

[PATCH, fortran] PR fortran/85982 -- Fix ICE on invalid attributes inside DEC structures

2018-11-12 Thread Fritz Reese
nobody sees any issues this week or so. (Nb. the test case is named dec_structure_28.f90 so as not to conflict with the pending patch for PR fortran/87919 which adds dec_structure_{24-27}.f90.) -- Fritz >From dc5a072017af29ca1e84b85b0e3a1e6af49a6928 Mon Sep 17 00:00:00 2001 From: Fritz Reese D

Re: PR fortran/87919 patch for -fno-dec-structure

2018-11-12 Thread Fritz Reese
On Thu, Nov 8, 2018 at 12:54 PM Jakub Jelinek wrote: > > On Thu, Nov 08, 2018 at 12:09:33PM -0500, Fritz Reese wrote: > > > What about the > > > /* Allow legacy code without warnings. */ > > > gfc_option.allow_std |= GFC_STD_F95_OBS | GFC_STD_F9

Re: PR fortran/87919 patch for -fno-dec-structure

2018-11-08 Thread Fritz Reese
On Wed, Nov 7, 2018 at 5:32 PM Jakub Jelinek wrote: > > On Wed, Nov 07, 2018 at 05:05:13PM -0500, Fritz Reese wrote: > > --- a/gcc/fortran/options.c > +++ b/gcc/fortran/options.c > @@ -32,6 +32,20 @@ along with GCC; see the file COPYING3. If not see > > gfc_option_t

Re: PR fortran/87919 patch for -fno-dec-structure

2018-11-07 Thread Fritz Reese
lue=0 condition. Similarly to the tests Mark provided with -fdec-structure, I've provided new tests for the various facets of -fno-dec, -fno-check-array-temporaries, and -fno-init-local-zero. Below is the changelog. Bootstraps and regtests fine for me on x86_64-redhat-linux. If it looks OK I'l

Re: [Patch, Fortran] PR 86116: Ambiguous generic interface not recognised

2018-08-14 Thread Fritz Reese
Looks OK to me. On Tue, Aug 14, 2018 at 4:12 AM Janus Weil wrote: > > ping! > > > Am So., 5. Aug. 2018 um 15:23 Uhr schrieb Janus Weil : > > > > Hi all, > > > > the attached patch fixes PR 86116 by splitting up the function > > 'compare_type' into two variants: One that is used for checking > > g

Re: [PATCH] Use getentropy() for seeding PRNG

2018-08-14 Thread Fritz Reese
On Mon, Aug 13, 2018 at 4:12 PM Janne Blomqvist wrote: > > On Mon, Aug 13, 2018 at 5:36 PM, Fritz Reese wrote: >> >> On Fri, Aug 3, 2018 at 9:19 AM Janne Blomqvist >> wrote: >> > >> > The getentropy function, found on Linux, OpenBSD, and recently al

Re: [PATCH] Use getentropy() for seeding PRNG

2018-08-13 Thread Fritz Reese
On Fri, Aug 3, 2018 at 9:19 AM Janne Blomqvist wrote: > > The getentropy function, found on Linux, OpenBSD, and recently also > FreeBSD, can be used to get random bytes to initialize the PRNG. It > is similar to the traditional way of reading from /dev/urandom, but > being a system call rather th

Re: [Patch, Fortran] PR 85599: warn about short-circuiting of logical expressions for non-pure functions

2018-07-17 Thread Fritz Reese
On Tue, Jul 17, 2018 at 2:36 PM Janus Weil wrote: > > 2018-07-17 19:34 GMT+02:00 Thomas Koenig : > > Am 17.07.2018 um 19:19 schrieb Janus Weil: [...] > > I do hope that things have converged by now and that this will be the > last incarnation of the patch. If there is no more feedback in the > nex

Re: [Patch, Fortran] PR 85599: warn about short-circuiting of logical expressions for non-pure functions

2018-07-17 Thread Fritz Reese
On Tue, Jul 17, 2018 at 10:32 AM Janus Weil wrote: > > 2018-07-17 9:52 GMT+02:00 Janus Weil : > >> 2018-07-16 21:50 GMT+02:00 Thomas Koenig : > >>> What I would suggest is to enable -Wfunction-eliminiation with > >>> -Wextra and also use that for your new warning. > >> > >> Thanks for the comments

Re: [PR fortran/83184] Fix matching code for clist/old-style initializers when encountering assumed-rank declarations

2018-07-17 Thread Fritz Reese
On Tue, Jul 17, 2018, 04:31 Janus Weil wrote: > Did someone actually approve this patch? Apparently it was committed > as r262744 and caused the following regression: > > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86543 > > Cheers, > Janus > > > > 2018-

[PR fortran/82865] Fix PDT declarations being parsed as PRINT statements with -fdec

2018-06-27 Thread Fritz Reese
asserted. Passes regression tests as well. The patch is attached. OK for trunk and 7/8-branch? 0dd08cefc2476014487b3eeab059784ab21bb41b Mon Sep 17 00:00:00 2001 From: Fritz Reese Date: Wed, 27 Jun 2018 15:43:45 -0400 Subject: [PATCH 3/3] PR fortran/82865 Do not override PDT declarations from

[PR fortran/83184] Fix matching code for clist/old-style initializers when encountering assumed-rank declarations

2018-06-27 Thread Fritz Reese
The attached patch fixes PR fortran/83184, which is actually two distinct bugs as described in the PR. Passes regtests. The patch is attached. OK for trunk and 7/8-branch? >From 238f0a0e80c93209bb4e62ba2f719f74f5da164f Mon Sep 17 00:00:00 2001 From: Fritz Reese Date: Wed, 27 Jun 2018 16:16

Re: [PR Fortran/83183] Fix infinite recursion (ICE) with -finit-derived when initializing allocatable BT_DERIVED components

2018-06-27 Thread Fritz Reese
iler's original behavior. This also fixes PR 86325 (mentioned above). The patch is attached. OK for trunk and 7/8-branch? >From e190d59153eaa7fbfcfabc93db31ddda0de3b869 Mon Sep 17 00:00:00 2001 From: Fritz Reese Date: Mon, 25 Jun 2018 17:51:00 -0400 Subject: [PATCH 1/3] PR fortran/83183 PR fortran/86325 F

[PR Fortran/83183] Fix infinite recursion (ICE) with -finit-derived when initializing allocatable BT_DERIVED components

2018-06-25 Thread Fritz Reese
:00 2001 From: Fritz Reese Date: Mon, 25 Jun 2018 17:51:00 -0400 Subject: [PATCH] PR fortran/83183 Fix infinite recursion occurring with -finit-derived generating initializers for allocatable derived-type components. gcc/fortran/ * expr.c (component_initializer): Do not generate initializers w

Re: [PRs fortran/82972, fortran/83088, fortran/85851] Fix ICE with -finit-derived when using iso_c_binding

2018-06-24 Thread Fritz Reese
Thanks for the review. I will commit tomorrow. --- Fritz Reese On Sat, Jun 23, 2018 at 11:57 AM, Steve Kargl wrote: > On Fri, Jun 22, 2018 at 04:46:19PM -0400, Fritz Reese wrote: >> >> In any case, the changelog is here, and the patch is attached. Aside >> from the issue

[PRs fortran/82972, fortran/83088, fortran/85851] Fix ICE with -finit-derived when using iso_c_binding

2018-06-22 Thread Fritz Reese
Mon Sep 17 00:00:00 2001 From: Fritz Reese Date: Fri, 22 Jun 2018 16:11:02 -0400 Subject: [PATCH] PR fortran/82972 Fix -finit-derived for c_ptr and c_funptr in programs which use iso_c_binding. gcc/fortran/ * expr.c (component_initializer): Assign init expr to c->initi

Re: [PATCH] PR fortran/78240 -- kludge of the day

2017-11-15 Thread Fritz Reese
On Wed, Nov 15, 2017 at 1:13 PM, Steve Kargl wrote: > On Tue, Nov 14, 2017 at 05:21:41PM -0500, Fritz Reese wrote: >> On Tue, Nov 14, 2017 at 4:58 PM, Janus Weil wrote: >> > Hi guys, >> > >> > I see this new test case failing on x86_64-linux-gnu: >>

Re: [PATCH] PR fortran/78240 -- kludge of the day

2017-11-14 Thread Fritz Reese
‘x’ at (1) must have constant shape > pr78240.f90:11:19: > >integer x(n)/1/ ! { dg-error "Nonconstant array" } >1 > Error: Nonconstant array section at (1) in DATA statement > [...] ... does anyone know how to tell dejagnu to expect multiple errors on a single line? --- Fritz Reese

Re: [PATCH] PR fortran/78240 -- kludge of the day

2017-11-13 Thread Fritz Reese
inting me to this issue and allowing me time to review it. The new patch passes all regression tests including its two tests (one for each issue above). OK to commit this one? --- Fritz Reese >From f2b8262a1a366b072493b129d38465ffa3d265bc Mon Sep 17 00:00:00 2001 From: Fritz Reese Date: Mon, 13 Nov

Re: [PATCH, Fortran] Fix PR 82886 - ICE with -finit-derived in gfc_conv_expr

2017-11-10 Thread Fritz Reese
On Fri, Nov 10, 2017 at 6:40 PM, Steve Kargl wrote: > On Fri, Nov 10, 2017 at 04:35:56PM -0500, Fritz Reese wrote: >> My mistake, the patch file should not have the random changes to >> libiberty/functions.texi. Not sure how that ended up there. >> > >> >

Re: [PATCH, Fortran] Fix PR 82886 - ICE with -finit-derived in gfc_conv_expr

2017-11-10 Thread Fritz Reese
My mistake, the patch file should not have the random changes to libiberty/functions.texi. Not sure how that ended up there. --- Fritz Reese On Fri, Nov 10, 2017 at 4:31 PM, Fritz Reese wrote: > All, > > The attached patch fixes the ICE reported in PR 82886. The ICE is due > to c

[PATCH, Fortran] Fix PR 82886 - ICE with -finit-derived in gfc_conv_expr

2017-11-10 Thread Fritz Reese
onent initializers. (Of course explicit -finit-* flags will still override this inference). Regression tests pass on x86_64-redhat-linux. OK? --- Fritz Reese >From e70f3917a7b2d35f9baad2f09199c1ccc60a04d4 Mon Sep 17 00:00:00 2001 From: Fritz Reese Date: Fri, 10 Nov 2017 16:10:06 -0500 Subject

[PATCH, Fortran, committed] PR82511: ICE Bad IO basetype (12) on attempted read or write of entire DEC structure

2017-10-16 Thread Fritz Reese
type variable, thus recursing into its final components (across all of its MAPs). --- Fritz Reese From 89ed92f0127b61bc802e43c8f3125f48540d7c27 Mon Sep 17 00:00:00 2001 From: Fritz Reese Date: Mon, 16 Oct 2017 13:27:28 -0400 Subject: [PATCH] Treat UNION components as DT comp. in I/O lists. PR

Re: [PATCH, Fortran] Support for legacy %FILL fields in STRUCTUREs

2017-08-10 Thread Fritz Reese
I find them strange too... But as you say, they are needed for old code, and some such code bases are quite large and/or have uncooperative users or maintainers. Committed with %qs throughout, thanks for review. --- Fritz Reese On Tue, Aug 1, 2017 at 11:29 AM, Thomas Koenig wrote: > Hi Fr

Re: [PATCH, Fortran] Correctly set -fd-lines-as-comments with -fdec

2017-08-10 Thread Fritz Reese
Yes I did. Committed, thanks. --- Fritz Reese On Tue, Aug 1, 2017 at 11:11 AM, Thomas Koenig wrote: > Hi Fritz, > >> This is a simple patch. The original intent was for -fdec to set >> -fd-lines-as-comments by default if flag_d_lines was unspecified by >> the

[PATCH, Fortran] Support for legacy %FILL fields in STRUCTUREs

2017-07-31 Thread Fritz Reese
e match is performed during parsing in decl.c (variable_decl) by generating a component with an internal anonymous name which is an invalid Fortran identifier to replace any components specified as '%FILL'. Regtests on x86_64-redhat-linux. OK for trunk? ---

[PATCH, Fortran] Slight cleanup in set_dec_flags

2017-07-31 Thread Fritz Reese
to ensure they are only set with value != 0 is appropriate for clarity and correctness. I plan to commit to trunk soon if there no objections since the patch is trivial and does not effectively change compiler behavior at present. --- Fritz Reese >From 805b4909deb450216c1dc522d834173455bac

[PATCH, Fortran] Correctly set -fd-lines-as-comments with -fdec

2017-07-31 Thread Fritz Reese
behavior to work as intended. Any objections for trunk? If not I think it is safe to commit. --- Fritz Reese >From e2761d73e818a5095bcc130ddbafe27022e25ba6 Mon Sep 17 00:00:00 2001 From: Fritz Reese Date: Mon, 31 Jul 2017 12:46:10 -0400 Subject: [PATCH] Correctly set -fd-lines-as-comments with -f

[PATCH, Fortran] PR 79968: merge similar diagnostics containing -fdec-structure

2017-05-17 Thread Fritz Reese
(Nb. even with the change in diagnostics, the applicable testcases (dec_io_3.f90 and dec_static_3.f90) are not regressed as they match only the "is a DEC extension" portion of the error message.) --- Fritz Reese 2017-05-17 Fritz Reese PR fortran/79968 gcc/fortran/ChangeLog:

Re: [PATCH, Fortran] PR 80668: wrong error message with -finit-derived

2017-05-09 Thread Fritz Reese
’. (2) Sorry, the comments were meant to show the error that would appear if the testcase is regressed; i.e., the error that appeared in the original PR report. If it is too esoteric I can just remove the comments. Version 2 attached. OK? --- Fritz Reese 2017-05-09 Fritz Reese PR fortr

[PATCH, Fortran] PR 80668: wrong error message with -finit-derived

2017-05-09 Thread Fritz Reese
\].ubound - parm...dim\\[0\\].lbound\\) \\+ 1, 0> \\* \\(3 - parm...dim\\[1\\].lbound\\), 0, &ii, 0B, 0\\);" 1 FAIL: gfortran.dg/mvbits_7.f90 -O0 (test for warnings, line 28) OK for trunk? --- Fritz Reese 2017-05-09 Fritz Reese PR fortran/80668 gcc/fortran/ChangeLog:

[PATCH, Fortran] PR78277: ICE in is_anonymous_component, at fortran/interface.c:450

2016-11-10 Thread Fritz Reese
-only changes to some dec-structure-related code; the poor formatting was introduced before I had my vim settings right. I intend to commit the two attached patches soon for trunk if nobody finds any issues with it. They both regtest on x86_64-redhat-linux of course. --- Fritz Reese >>>>&g

[PATCH, Fortran] PR78259: ICE in gfc_trans_subcomponent_assign, at fortran/trans-expr.c:7330

2016-11-09 Thread Fritz Reese
All, Will commit the below to trunk as an obvious fix for PR78259. (The regression was introduced in r241626 from https://gcc.gnu.org/ml/fortran/2016-10/msg00206.html). The patch clears regtests. --- Fritz Reese From: Fritz O. Reese Date: Wed, 9 Nov 2016 10:59:17 -0500 Subject: [PATCH] Fix ICE

[PING!] Re: [PATCH, Fortran] DEC Compatibility: Default missing exponents to 0 with -fdec

2016-11-03 Thread Fritz Reese
https://gcc.gnu.org/ml/fortran/2016-10/msg00222.html On Wed, Oct 26, 2016 at 10:14 AM, Fritz Reese wrote: > All, > > Attached is a patch to the GNU Fortran front-end and runtime library > (libgfortran) which accepts real numbers with missing exponents as if > '0' was g

[PATCH, Fortran] Extension: Support legacy PARAMETER statements with -std=legacy (or -fdec?)

2016-11-02 Thread Fritz Reese
uot; errors for legacy code without -fdec. The case would be difficult to detect and work around specifically since the entire parameter "assignment" statement is eaten by the time the error comes about. What do you think? --- Fritz Reese Author: Fritz O. Reese Date: Tue Nov 1 12:26:5

Re: [PATCH, Fortran] New warning flag -Wargument-mismatch to control argument mismatch warnings

2016-11-01 Thread Fritz Reese
.f90: New test. --- Fritz Reese On Tue, Nov 1, 2016 at 3:38 PM, Fritz Reese wrote: > See attached... > > --- > Fritz Reese > > > On Tue, Nov 1, 2016 at 11:24 AM, Fritz Reese wrote: >> All, >> >> Here I propose a new warning flag -Wargument-mismatch

Re: [PATCH, Fortran] New warning flag -Wargument-mismatch to control argument mismatch warnings

2016-11-01 Thread Fritz Reese
See attached... --- Fritz Reese On Tue, Nov 1, 2016 at 11:24 AM, Fritz Reese wrote: > All, > > Here I propose a new warning flag -Wargument-mismatch to control > warnings emitted when the type, rank, or some other property of actual > arguments does not match that of a fu

[PATCH, Fortran] New warning flag -Wargument-mismatch to control argument mismatch warnings

2016-11-01 Thread Fritz Reese
oing" and refuses to change his/her code. [1] https://gcc.gnu.org/ml/fortran/2016-11/msg3.html Bootstraps and regtests on x86_64-redhat-linux. if (gfc_accepted ([1])) { gfc_ask_ok_for_trunk ($0); } --- Fritz Reese

[PATCH, Fortran] Allow warnings given through gfc_error to associate with warning flags

2016-11-01 Thread Fritz Reese
match, assuming this one is OK. --- Fritz Reese From: Fritz Reese Date: Thu, 27 Oct 2016 13:33:57 -0400 Subject: [PATCH] Allow warning flags to associate through gfc_error. gcc/fortran/ * gfortran.h (gfc_error): New declaration for gfc_error with 'opt'. * error.c

[PATCH] Fall-through warnings in combine.c

2016-10-31 Thread Fritz Reese
I think this is obvious, the following code in combine.c which intends to fallthrough some switch cases is not marked with 'gcc_fallthrough' as it should be, thus producing warnings during compilation. --- Fritz Reese 2016-10-31 Fritz Reese gcc/combine.c (simplify_com

Re: [PATCH, Fortran] DEC Compatibility: New I/O Specifiers CARRIAGECONTROL, READONLY, SHARE with -fdec

2016-10-27 Thread Fritz Reese
On Thu, Oct 27, 2016 at 8:52 AM, Jakub Jelinek wrote: > On Thu, Oct 27, 2016 at 08:49:42AM -0400, Fritz Reese wrote: >> >> Do you know if there is there any way from DG to verify that a runtime >> warning is emitted? > > Use dg-output for that. And, if the test is sup

Re: [PATCH, Fortran] DEC Compatibility: New I/O Specifiers CARRIAGECONTROL, READONLY, SHARE with -fdec

2016-10-27 Thread Fritz Reese
On Thu, Oct 27, 2016 at 8:49 AM, Fritz Reese wrote: > From: Fritz Reese > Date: Thu, 27 Oct 2016 08:46:33 -0400 > Subject: [PATCH] Fix some DEC I/O testcases. > > gcc/testsuite/gfortran.dg/ > * dec_io_5.f90: Rename 'test.txt' to 'dec_io_5.tx

Re: [PATCH, Fortran] DEC Compatibility: New I/O Specifiers CARRIAGECONTROL, READONLY, SHARE with -fdec

2016-10-27 Thread Fritz Reese
On Thu, Oct 27, 2016 at 8:16 AM, Jakub Jelinek wrote: > On Thu, Oct 27, 2016 at 07:46:16AM -0400, Fritz Reese wrote: >> > Shouldn't something also remove dec_io_5.txt file if it is created? >> > Shall the (now xfailed, so not implemented yet?) runtime error terminate &

Re: [PATCH, Fortran] DEC Compatibility: Logical operations on integers become bitwise ops with -fdec

2016-10-27 Thread Fritz Reese
How odd. Good catch. --- Fritz Reese On Thu, Oct 27, 2016 at 4:41 AM, Andreas Schwab wrote: > I have filed PR78128, this may be a target bug. > > Andreas. > > -- > Andreas Schwab, SUSE Labs, sch...@suse.de > GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE 1748 E4D4 88E3 0EE

Re: [PATCH, Fortran] DEC Compatibility: New I/O Specifiers CARRIAGECONTROL, READONLY, SHARE with -fdec

2016-10-27 Thread Fritz Reese
On Thu, Oct 27, 2016 at 7:32 AM, Jakub Jelinek wrote: > On Thu, Oct 27, 2016 at 07:25:24AM -0400, Fritz Reese wrote: >> On Thu, Oct 27, 2016 at 7:02 AM Andreas Schwab wrote: >> ... >> > At line 12 of file >> > /usr/local/gcc/gcc-20161027/gcc/testsuite/gfortra

Re: [PATCH, Fortran] DEC Compatibility: New I/O Specifiers CARRIAGECONTROL, READONLY, SHARE with -fdec

2016-10-27 Thread Fritz Reese
On Thu, Oct 27, 2016 at 7:02 AM Andreas Schwab wrote: ... > At line 12 of file > /usr/local/gcc/gcc-20161027/gcc/testsuite/gfortran.dg/dec_io_6.f90 (unit = 8) > Fortran runtime error: Cannot open file 'test.txt': No such file or directory > Indeed. From: Fritz Reese Dat

Re: [PATCH, Fortran] DEC Compatibility: Logical operations on integers become bitwise ops with -fdec

2016-10-26 Thread Fritz Reese
On Wed, Oct 26, 2016 at 10:32 AM, Andreas Schwab wrote: > On Okt 26 2016, Fritz Reese wrote: > >> I can't seem to reproduce this on x86-64. Did you fully apply the >> patch? > > I don't have any patches. > Sorry for the confusion, I meant the originally att

[PATCH, Fortran] DEC Compatibility: Default missing exponents to 0 with -fdec

2016-10-26 Thread Fritz Reese
be backwards-compatible (by design of the IOPARM structures/flags). Bootstraps and regtests on x86_64-redhat-linux. OK for trunk? --- Fritz Reese From: Fritz Reese Date: Wed, 5 Oct 2016 18:27:56 -0400 Subject: [PATCH] Default missing exponents to 0 with -fdec. gcc/fortran/ * gfort

Re: [PATCH, Fortran] DEC Compatibility: Logical operations on integers become bitwise ops with -fdec

2016-10-26 Thread Fritz Reese
On Wed, Oct 26, 2016 at 6:16 AM, Andreas Schwab wrote: > On Okt 25 2016, Fritz Reese wrote: > >> * dec_bitwise_ops_1.f90, dec_bitwise_ops_2.f90: New testcases. > > I'm getting these errors on ia64: > > FAIL: gfortran.dg/dec_bitwise_ops_1.f90 -O0 (tes

Re: [PATCH, Fortran] DEC Compatibility: Logical operations on integers become bitwise ops with -fdec

2016-10-26 Thread Fritz Reese
On Wed, Oct 26, 2016 at 6:16 AM, Andreas Schwab wrote: > On Okt 25 2016, Fritz Reese wrote: > >> * dec_bitwise_ops_1.f90, dec_bitwise_ops_2.f90: New testcases. > > I'm getting these errors on ia64: > > FAIL: gfortran.dg/dec_bitwise_ops_1.f90 -O0 (tes

Re: [PATCH, Fortran] DEC Compatibility: New I/O Specifiers CARRIAGECONTROL, READONLY, SHARE with -fdec

2016-10-26 Thread Fritz Reese
On Tue, Oct 25, 2016 at 11:36 PM, Jerry DeLisle wrote: > On 10/25/2016 11:52 AM, Fritz Reese wrote: >> >> All, >> >> Here's the big one. This patch proposes an extension to both the GNU >> Fortran front-end and runtime library (libgfortran) to supp

Re: [PATCH, Fortran] DEC Compatibility: New I/O Specifiers CARRIAGECONTROL, READONLY, SHARE with -fdec

2016-10-25 Thread Fritz Reese
On Tue, Oct 25, 2016 at 5:29 PM, Jerry DeLisle wrote: > On 10/25/2016 11:52 AM, Fritz Reese wrote: >> >> All, >> >> Here's the big one. This patch proposes an extension to both the GNU >> Fortran front-end and runtime library (libgfortran) to supp

[PATCH, Fortran] DEC Compatibility: New I/O Specifiers CARRIAGECONTROL, READONLY, SHARE with -fdec

2016-10-25 Thread Fritz Reese
ROL='FORTRAN'. These two bytes still leave plenty of trailing 'pad' for future expansion. Bootstraps and regtests on x86_64-redhat-linux. There's a fair bit to sift through, so feel free to ask for clarification or provide comments/constructive criticism. OK for trunk? --- F

[PATCH, Fortran] DEC Compatibility: Logical operations on integers become bitwise ops with -fdec

2016-10-25 Thread Fritz Reese
y, but if anyone has a different opinion I can certainly do this with -std=legacy instead of -fdec. Bootstraps and regtests on x86_64-redhat-linux, OK for trunk? --- Fritz Reese From: Fritz Reese Date: Mon, 24 Oct 2016 13:47:38 -0400 Subject: [PATCH] Logical operations on integers become bitw

[PATCH, Fortran] Fix initialization of UNIONs with -finit-derived

2016-10-25 Thread Fritz Reese
ifies that explicit user-given initializers are not regressed with the implementation. Since this only touches my own UNION and -finit-derived code I aim to commit it in a few days if nobody finds anything wrong with the patch. Bootstraps and regtests on x86_64-redhat-linux. --- Fritz Reese

Re: [PATCH, Fortran] Four small DEC extensions

2016-10-25 Thread Fritz Reese
On Tue, Oct 25, 2016 at 11:46 AM, Fritz Reese wrote: ... > Committed r241516, r241517, r241518, r241519. ... and r241520. --- Fritz Reese

Re: [PATCH, Fortran] Four small DEC extensions

2016-10-25 Thread Fritz Reese
On Mon, Oct 24, 2016 at 10:47 PM, Jerry DeLisle wrote: > On 10/24/2016 07:23 AM, Fritz Reese wrote: >> >> https://gcc.gnu.org/ml/fortran/2016-10/msg00087.html et. al. >>> >>> On 12/10/16 13:30, Fritz Reese wrote: >>>> >>>> Here I s

Re: PING! Re: [PATCH, Fortran] Extension: COTAN and degree-valued trig intrinsics with -fdec-math

2016-10-25 Thread Fritz Reese
On Tue, Oct 25, 2016 at 11:37 AM Cesar Philippidis wrote: > > On 10/10/2016 08:06 AM, Fritz Reese wrote: > > > --- a/gcc/fortran/intrinsic.texi > > +++ b/gcc/fortran/intrinsic.texi > > @@ -23,6 +23,9 @@ Some basic guidelines for editing this document: > > @en

Re: [PATCH, Fortran] Four small DEC extensions

2016-10-24 Thread Fritz Reese
https://gcc.gnu.org/ml/fortran/2016-10/msg00087.html et. al. > On 12/10/16 13:30, Fritz Reese wrote: >> Here I submit for review four small extensions to the GNU Fortran >> frontend for compatibility with legacy code. I figure it might be a >> nice change of pace from my large

[PATCH, Fortran] Four small DEC extensions

2016-10-12 Thread Fritz Reese
using the LOC() intrinsic. 4. [-fdec-logical-xor] Enable .XOR. as a logical operator. Feel free to comment on/question/approve each patch individually as desired. They are attached as sequential patch files for ease of review. Bootstraps & regtests on x86_64-redhat- linux. OK for trunk? --- F

Re: [PATCH] Fix formatting of the -fdec-math changes

2016-10-11 Thread Fritz Reese
On Tue, Oct 11, 2016 at 3:00 PM, Jakub Jelinek wrote: > On Tue, Oct 11, 2016 at 02:47:34PM -0400, Fritz Reese wrote: >> On Tue, Oct 11, 2016 at 2:44 PM, Fritz Reese wrote: >> > On Mon, 2016-10-11 08:43 AM, Markus Trippelsdorf >> > wrote: >&g

Re: PING! Re: [PATCH, Fortran] Extension: COTAN and degree-valued trig intrinsics with -fdec-math

2016-10-11 Thread Fritz Reese
On Tue, Oct 11, 2016 at 2:44 PM, Fritz Reese wrote: > On Mon, 2016-10-11 08:43 AM, Markus Trippelsdorf > wrote: >> This patch breaks bootstrap: > ... > > Sorry all!! was in a rush to get in the car this morning and made a > hasty commit. Fixed for r241001 (sorry Jerry, I

Re: PING! Re: [PATCH, Fortran] Extension: COTAN and degree-valued trig intrinsics with -fdec-math

2016-10-11 Thread Fritz Reese
On Mon, 2016-10-11 08:43 AM, Markus Trippelsdorf wrote: > This patch breaks bootstrap: ... Sorry all!! was in a rush to get in the car this morning and made a hasty commit. Fixed for r241001 (sorry Jerry, I was a little too slow.) --- Fritz Reese

Re: PING! Re: [PATCH, Fortran] Extension: COTAN and degree-valued trig intrinsics with -fdec-math

2016-10-11 Thread Fritz Reese
mpfr_div_ui (factor->value.real, factor->value.real, 180, GFC_RND_MODE); > ... Good catch, fixed and committed r240989. Many thanks to you and Jerry. --- Fritz Reese

  1   2   >