Re: [PATCH] PR fortran/89943 -- Duplicate BIND(c) allowed (?)

2019-10-12 Thread Paul Richard Thomas
Hi Steve, In the F2018 standard: C1550 (R1526) If MODULE appears in the prefix of a module subprogram and a binding label is specified, it shall be the same as the binding label specified in the corresponding module procedure interface body. While it does not say explicitly that a repeat binding

Re: [PATCH] PR fortran/90297 -- Remove code with no functional effect

2019-10-12 Thread Paul Richard Thomas
Hi Steve, As I remarked on the PR thread, it is one of the less harmful bits of code that I introduced :-) OK to commit. Thanks Paul On Sat, 12 Oct 2019 at 01:17, Steve Kargl wrote: > > The patch is fairly self-explanatory. OK to commit? > > 2019-10-11 Steven G. Kargl > > PR fortr

Re: [Patch, fortran] PR91926 - assumed rank optional

2019-10-09 Thread Paul Richard Thomas
Hi Christophe, Thanks for flagging this up - I am back at base on Saturday and will take it up then. Regards Paul On Wed, 9 Oct 2019 at 11:13, Christophe Lyon wrote: > > Hi, > > > On Sat, 5 Oct 2019 at 20:31, Paul Richard Thomas > wrote: >> >> I must apo

[Patch, fortran] PR91926 - assumed rank optional

2019-10-05 Thread Paul Richard Thomas
I must apologise not posting this before committing. I left for a vacation this morning and I thought that this problem and the one posted by Gilles were best fixed before departing. The patch only touches the new ISO_Fortran binding feature and so I thought that I would be safe to do this. It was

[Patch, fortran] PR91729 - ICE in gfc_match_select_rank, at fortran/match.c:6586

2019-09-23 Thread Paul Richard Thomas
Fixed as obvious in revision: 276051. The patch is largely due to Steve, for which thanks. Paul 2019-09-23 Paul Thomas PR fortran/91729 * match.c (gfc_match_select_rank): Initialise 'as' to NULL. Check for a symtree in the selector expression before trying to assign a value t

[Patch, fortran] PR91726 - [7/8/9/10 Regression] ICE in gfc_conv_array_ref, at fortran/trans-array.c:3612

2019-09-22 Thread Paul Richard Thomas
Fixing the original problem in the module took a few minutes. Making the module do something useful took rather longer! The testcase in the patch compiles with 6-branch but segfaults in runtime. Bootstrapped and regtested on FC30/x86_64 - OK to commit and go steadily back through the branches over

Re: [Patch, Fortran] CO_BROADCAST for derived types with allocatable components

2019-09-15 Thread Paul Richard Thomas
Hi Sandro, This patch looks fine to me. I have a question about the comment: "This code is obviously added because the finalizer is not trusted to free all memory." 'obviously'? Not to me :-( Maybe you can expand on this? As to the stat and errmsg: Leave them for the time being. However, an attem

[Patch, fortran] PR91588 - ICE in check_inquiry, at fortran/expr.c:2673

2019-09-15 Thread Paul Richard Thomas
The attached bootstraps and regtests on FC30/x86_64 - OK for trunk? It strikes me that this should be backported since the bug is rather fundamental and ispresent all the way back to version 4.8. An obvious question is how far back? To 8-branch? Cheers Paul 2019-09-15 Paul Thomas PR for

Re: [Patch, fortran] PR91717 - ICE on concatenating deferred-length character and character literal

2019-09-12 Thread Paul Richard Thomas
Thanks - committed as r275696. Paul On Thu, 12 Sep 2019 at 15:09, Steve Kargl wrote: > > On Thu, Sep 12, 2019 at 09:55:20AM +0100, Paul Richard Thomas wrote: > > > > OK to commit? > > > > Yes. > > -- > Steve -- "If you can't explain it simp

[Patch, fortran] PR91686 - ICE in gimplify:2554

2019-09-12 Thread Paul Richard Thomas
Committed as 'obvious' in revision 275681: 2019-09-12 Paul Thomas PR fortran/91686 Backport from mainline * trans-expr.c (gfc_trans_assignment_1): Copy and paste section handling the rse.pre block from mainline. 2019-09-12 Paul Thomas PR fortran/91686 * gfortran.dg

Re: [Patch, fortran] PR91717 - ICE on concatenating deferred-length character and character literal

2019-09-12 Thread Paul Richard Thomas
eturning 1 from gfc_dep_resolver covers this case. OK to commit? Cheers Paul realloc_string_callback) On Thu, 12 Sep 2019 at 00:05, Steve Kargl wrote: > > On Wed, Sep 11, 2019 at 11:27:56PM +0100, Paul Richard Thomas wrote: > > Hi Steve, > > > > Being an allocatable component

Re: [Patch, fortran] PR91717 - ICE on concatenating deferred-length character and character literal

2019-09-11 Thread Paul Richard Thomas
, Paul Richard Thomas wrote: > > === > > *** gcc/testsuite/gfortran.dg/dependency_55.f90 (nonexistent) > > --- gcc/testsuite/gfortran.dg/dependency_55.f90 (working copy) > > *** > > *** 0

[Patch, fortran] PR91717 - ICE on concatenating deferred-length character and character literal

2019-09-10 Thread Paul Richard Thomas
Hi All, I nearly committed this patch as 'obvious' but noticed a fair number of changes in 10-branch in dependency analysis. This is in fact a 10-regression. I'll wait for an OK. Bootstrapped and regtested on FC30/x86_64 - OK to commit? Paul 2019-09-11 Paul Thomas PR fortran/91717 *

[Patch-fortran] PR91589 - [9/10 Regression] ICE in gfc_conv_component_ref, at fortran/trans-expr.c:2447

2019-09-01 Thread Paul Richard Thomas
This was caused by my inquiry ref patch. I will commit to both branches tomorrow night unless there is an objection. Bootstraps and regtests on FC29/x86_64. Paul 2019-09-02 Paul Thomas PR fortran/91589 * primary.c (gfc_match_varspec): Return MATCH_NO on an apparent component ref

Re: [PATCH] PR fortran/91552 -- Walk array constructor to do type conversion

2019-09-01 Thread Paul Richard Thomas
Hi Steve, OK to commit. Thanks Paul On Sat, 31 Aug 2019 at 21:16, Steve Kargl wrote: > > The attached patch has been built and tested on i586-*-freebsd > and x86_64-*-freebsd. OK to commit? > > The patch fixes an ICE during type conversion where an array > constructor contains another array.

Re: [Patch, fortran] Implementation of F2018 SELECT RANK

2019-09-01 Thread Paul Richard Thomas
Hi Steve, Thanks for the remarks and the OK. Committed as revision 275269. Onward to PDTs! Cheers Paul On Sat, 31 Aug 2019 at 18:46, Steve Kargl wrote: > > On Sat, Aug 31, 2019 at 04:59:03PM +0100, Paul Richard Thomas wrote: > > > > Bootstraps and regtests on FC29/x86

Re: [Patch, fortran] Implementation of F2018 SELECT RANK

2019-08-31 Thread Paul Richard Thomas
Hi Steve, > > > If an error occurs, should this set m = MATCH_ERROR and goto cleanup? > > > OR, set m = MATCH_ERROR, free expr1 and expr2 and return m? > > > IOW, if an error occurs, why should gfortran continue to match select > > > rank? This prevents or reduces the deluge of errors that come

[Patch, fortran] Implementation of F2018 SELECT RANK

2019-08-31 Thread Paul Richard Thomas
When I started on this about three months ago, I thought that with SELECT TYPE as a template this was going to be low hanging fruit. Not so :-) Among the issues on the way were: class selectors; unlimited polymorphic selectors even more so; and error recovery. It's a good starting point but I am n

Re: [PR fortran/91496] !GCC$ directives error if mistyped or unknown

2019-08-27 Thread Paul Richard Thomas
Hi Harald, This is OK for trunk. Thanks! Paul On Mon, 26 Aug 2019 at 22:13, Harald Anlauf wrote: > > Dear all, > > the attached patch adds Fortran support for the following pragmas > (loop annotations): IVDEP (ignore vector dependencies), VECTOR, and > NOVECTOR. Furthermore, it downgrades uns

Re: [patch, fortran] Fix PR 90561

2019-08-13 Thread Paul Richard Thomas
Hi Thomas, Yes that's good to apply to 9 and 10 branches. I am certain that there are other places where the new function will be very helpful. Thanks for the patch. Paul On Tue, 13 Aug 2019 at 13:59, Thomas König wrote: > > Hello world, > > this patch fixes a 9/10 regression by placing the va

Re: [PATCH] PR fortran/42546 -- ALLOCATED has 2 mutually exclusive keywords

2019-08-06 Thread Paul Richard Thomas
Hi Steve, Who thought of that one in the standard? Uuugh! The solution looks good to commit - again as far back as you feel inclined to do. Regards Paul On Tue, 6 Aug 2019 at 19:27, Steve Kargl wrote: > > Ping. > > On Thu, Aug 01, 2019 at 02:11:39PM -0700, Steve Kargl wrote: > > The attached

Re: [PATCH] PR fortran/91359 -- A function should return something

2019-08-06 Thread Paul Richard Thomas
Hi Steve, That certainly does the trick! OK to commit as far back as you have the intestinal fortitude for. Thanks Paul On Tue, 6 Aug 2019 at 19:24, Steve Kargl wrote: > > The spaghetti code in PR fortran/91359 has a few gotos > to jump to different places. In doing so, gfortran > with genera

Re: [PATCH] PR fortran/88227 -- Revenge of the BOZ

2019-08-04 Thread Paul Richard Thomas
Hi Steve, This is OK. Thanks for working on it. Paul On Thu, 1 Aug 2019 at 22:13, Steve Kargl wrote: > > Ping. > > -- > steve > > On Sun, Jul 28, 2019 at 04:41:02PM -0700, Steve Kargl wrote: > > The attach patch fixes a problem with the conversion of a > > BOZ literal constant to a REAL where

Re: [patch, fortran] Fix PR 90813

2019-07-28 Thread Paul Richard Thomas
Hi Thomas, That is very well done. Thanks for picking it up and running with it. OK on both the fix and the dumping of the gsymbols. You might consider back porting both this patch and my fix for the original bug to 9-branch. Regards Paul On Sun, 28 Jul 2019 at 22:50, Thomas Koenig wrote: > >

Re: [Patch, fortran] PR90903 - Implement runtime checks for bit manipulation intrinsics

2019-07-15 Thread Paul Richard Thomas
Hi Harald and Steve, The patch looks fine to me - it's good be committed. Thanks Paul On Mon, 15 Jul 2019 at 03:34, Steve Kargl wrote: > > Harald, thanks for the patch. I'm that the best person > for reading the trans-* file, but your patch and changes > look good to me. If no one else speak

Re: [Patch, fortran] PR91077 - [8/9/10 Regression] Wrong indexing when using a pointer

2019-07-07 Thread Paul Richard Thomas
Thanks, Steve. Fixed with revisions 273176, 7 & 8. Paul On Sat, 6 Jul 2019 at 18:05, Steve Kargl wrote: > > On Sat, Jul 06, 2019 at 02:29:06PM +0100, Paul Richard Thomas wrote: > > As anticipated, 8-branch required a different patch but the difference > > was much sm

Re: [Patch, fortran] PR91077 - [8/9/10 Regression] Wrong indexing when using a pointer

2019-07-06 Thread Paul Richard Thomas
gave symbol backend decl for subref arrays. 2019-07-06 Paul Thomas PR fortran/91077 * gfortran.dg/pointer_array_11.f90 : New test. On Sat, 6 Jul 2019 at 11:48, Paul Richard Thomas wrote: > > This problem was caused by the code for scalarized array references to > subref a

[Patch, fortran] PR91077 - [8/9/10 Regression] Wrong indexing when using a pointer

2019-07-06 Thread Paul Richard Thomas
This problem was caused by the code for scalarized array references to subref arrays and deferred length variables not obtaining the correct array descriptor and so getting the array span wrong. As it happens, the lines, following the deleted part, correctly identify when the info descriptor is a p

Re: [PATCH] PR fortran/87907 -- Don't dereference a NULL pointer

2019-06-19 Thread Paul Richard Thomas
Hi Steve, I'm surprised that you didn't commit as obvious :-) OK for trunk. Thanks Paul On Tue, 18 Jun 2019 at 20:30, Steve Kargl wrote: > > The attach patch has been regression tested on x86_64-*-freebsd. > If the pointer is NULL, the function simply returns. It seems > that gfortran then do

Re: [PATCH] PR fortran/68544 -- A derived type cannot be actual argument

2019-06-12 Thread Paul Richard Thomas
Hi Steve, That's good to go - thanks Paul On Wed, 12 Jun 2019 at 23:44, Steve Kargl wrote: > > The attach patch has been sitting in my tree for a year. > It has been tested and updated as others have changed > the gfortran code. The patch has been compiled and > regression tested on x86_64-*-f

Re: [PATCH] PR fortran/88810 -- Code clean up

2019-06-12 Thread Paul Richard Thomas
Hi Steve, As the original author of the confusing code, I want to thank you for de-confusing it! OK Paul On Wed, 12 Jun 2019 at 20:01, Steve Kargl wrote: > > This PR flags a section of confusing but correct code. > The attach patch rewrites the code to hopefully provide > some clarity. It has

Re: [PATCH] PR fortran/89344 -- INTENT(IN) CLASS(*) cannot be assigned to

2019-06-12 Thread Paul Richard Thomas
Hi Steve, OK - thanks Paul On Wed, 12 Jun 2019 at 19:42, Steve Kargl wrote: > > The attach patch has lived in my tree for 4 months. > It's time to submit it. Passed regression testing > for a long time. > > An INTENT(in) entity that has CLASS(*) dummy argument > should not use SELECT TYPE to t

Re: [PATCH] PR fortran/90002 -- Free array-spec for assumed-shaped coarray

2019-06-11 Thread Paul Richard Thomas
OK, Steve Thanks Paul On Wed, 12 Jun 2019 at 02:04, Steve Kargl wrote: > > The attached patch fixes an ICE when freeing an array-spec > that involves an assumed-shaped coarray (see testcase). The > patch regression tests cleanly. I don't use coarrays, so > cannot say whether the testcase is v

Re: [Patch, fortran] PR90786 - [7/8/9/10 Regression] ICE on procedure pointer assignment to function with class pointer result

2019-06-10 Thread Paul Richard Thomas
CC computer farm though. > > Christophe > > > > > > Many thanks for flagging it up. > > > > Paul > > > > On Mon, 10 Jun 2019 at 10:07, Christophe Lyon > > wrote: > > > > > > On Sat, 8 Jun 2019 at 18:25, Andrew Benson > &g

Re: [Patch, fortran] PR90786 - [7/8/9/10 Regression] ICE on procedure pointer assignment to function with class pointer result

2019-06-10 Thread Paul Richard Thomas
nks Paul for the quick fix! > > > > On Saturday, June 8, 2019 4:56:46 PM PDT Paul Richard Thomas wrote: > > > Committed as obvious in revision 272084. > > > > > > The problem was that the lhs symbol itself was not being checked as a > > > pr

[Patch, fortran] PR90786 - [7/8/9/10 Regression] ICE on procedure pointer assignment to function with class pointer result

2019-06-08 Thread Paul Richard Thomas
Committed as obvious in revision 272084. The problem was that the lhs symbol itself was not being checked as a proc_pointer - just the expression component. I will get on with backporting tomorrow. Cheers Paul 2019-06-08 Paul Thomas PR fortran/90786 * trans-expr.c (pointer_assignme

Re: [patch, fortran] Two tweaks to argument repacking

2019-06-02 Thread Paul Richard Thomas
Hi Thomas, It looks good to me. OK for trunk. Thanks Paul On Sun, 2 Jun 2019 at 14:34, Thomas Koenig wrote: > > Hello world, > > this patch adds two tweaks to the argument repacking. > > First, when the size of an argument is known to be one, as in a(n1:n1), > we can directly pass a pointer -

[Patch, fortran] PR90498 - [8/9/10 Regression] ICE with select type/associate and derived type argument containing class(*)

2019-05-18 Thread Paul Richard Thomas
This turns out to be obvious. The component of the dummy argument cannot be replaced by the hidden descriptor (actually the class object) and so an ICE occurs. The fix is to add a guard against the expression being a COMPONENT_REF. I will commit to all three branches tomorrow unless there are any

Re: [Patch, fortran] ISO_Fortran_binding PRs 90093, 90352 & 90355

2019-05-11 Thread Paul Richard Thomas
Committed to 9-branch as revision 271089. Paul On Fri, 10 May 2019 at 09:00, Paul Richard Thomas wrote: > > Committed to trunk as revision 271057. > > Will do likewise with 9-branch asap. > > Cheers > > Paul > > On Wed, 8 May 2019 at 19:40, Paul Richard Thomas >

Re: [Patch, fortran] ISO_Fortran_binding PRs 90093, 90352 & 90355

2019-05-10 Thread Paul Richard Thomas
Committed to trunk as revision 271057. Will do likewise with 9-branch asap. Cheers Paul On Wed, 8 May 2019 at 19:40, Paul Richard Thomas wrote: > > Unless there are any objections to this patch, I plan to commit to > trunk and 9-branch tomorrow night, with the change to the testcase

Re: [Patch, fortran] ISO_Fortran_binding PRs 90093, 90352 & 90355

2019-05-08 Thread Paul Richard Thomas
fixing PDTs. Cheers Paul On Mon, 6 May 2019 at 19:59, Paul Richard Thomas wrote: > > It helps to attach the patch! > > On Mon, 6 May 2019 at 19:57, Paul Richard Thomas > wrote: > > > > Unfortunately, this patch was still in the making at the release of >

Re: [Patch, fortran] ISO_Fortran_binding PRs 90093, 90352 & 90355

2019-05-07 Thread Paul Richard Thomas
Hi Dominique, Many thanks - I had already found this after replenishing my tree and regtesting. I don't quite know how it escaped but the fix is obvious. Amicalement Paul On Tue, 7 May 2019 at 09:39, Dominique d'Humières wrote: > > Hi Paul, > > With your patch, I see > > FAIL: gfortran.dg/iso_

Re: [Patch, fortran] ISO_Fortran_binding PRs 90093, 90352 & 90355

2019-05-06 Thread Paul Richard Thomas
It helps to attach the patch! On Mon, 6 May 2019 at 19:57, Paul Richard Thomas wrote: > > Unfortunately, this patch was still in the making at the release of > 9.1. It is more or less self explanatory with the ChangeLogs. > > It should be noted that gfc_conv_expr_present could not

[Patch, fortran] ISO_Fortran_binding PRs 90093, 90352 & 90355

2019-05-06 Thread Paul Richard Thomas
Unfortunately, this patch was still in the making at the release of 9.1. It is more or less self explanatory with the ChangeLogs. It should be noted that gfc_conv_expr_present could not be used in the fix for PR90093 because the passed descriptor is a CFI type. Instead, the test is for a null poin

Re: [patch, fortran] Inline packing for array temporaries

2019-04-28 Thread Paul Richard Thomas
Hi Thomas, Could you provide the patch, please, or was it already posted? Cheers Paul On Sun, 28 Apr 2019 at 10:46, Thomas Koenig wrote: > > Hello world, > > going back a patch which was not included in gcc-9 because it was too > late in the development cycle, here is a patch which, when optim

Re: [Patch, fortran] PRs 89843 and 90022 - C Fortran Interop fixes.

2019-04-26 Thread Paul Richard Thomas
> > > print *, x > > > > before > > > > if (any (abs (x - [1.,20.,3.,40.,5.,60.]) > 1.e-6)) stop 2 > > > > the test succeeds!-( > > > > Also you don’t want pr89844 to be solved, don’t you? > > > > TIA > > > > Dominique &g

Re: [Patch, fortran] PR57284 - [OOP] ICE with find_array_spec for polymorphic arrays

2019-04-21 Thread Paul Richard Thomas
Thanks, Steve. Committed as revision 270489. Paul On Fri, 19 Apr 2019 at 18:28, Steve Kargl wrote: > > On Fri, Apr 19, 2019 at 06:19:00PM +0100, Paul Richard Thomas wrote: > > The part of this patch in resolve.c had essentially already been > > sorted out by Tobias Burnus in

Re: [PATCH] PR fortran/90166 -- check F2018:C1547

2019-04-20 Thread Paul Richard Thomas
It looks good to me, modulo Dominique's query. OK for trunk (note from Richi - still aiming for zero P1 bugs so you're good to go). Thanks Paul On Fri, 19 Apr 2019 at 22:44, Steve Kargl wrote: > > The attached patch fixes PR fortran/91066. The original > code was feeding a nonsense string of

[Patch, fortran] PR57284 - [OOP] ICE with find_array_spec for polymorphic arrays

2019-04-19 Thread Paul Richard Thomas
The part of this patch in resolve.c had essentially already been sorted out by Tobias Burnus in comment #2 of the PR. I suspect that he must have been put off the trail by the segfault that occurred when this was implemented. In the end, the reason for the segfault is quite straight forward and com

Re: [Patch, fortran] PRs 89843 and 90022 - C Fortran Interop fixes.

2019-04-15 Thread Paul Richard Thomas
093 > all other test cases I have now execute correctly. > > Cheers > Reinhold > > > -Ursprüngliche Nachricht- > > Von: Paul Richard Thomas > > Gesendet: Sonntag, 14. April 2019 20:16 > > An: Thomas Koenig > > Cc: Gilles Gouaillardet ; Ba

Re: [Patch, fortran] PRs 89843 and 90022 - C Fortran Interop fixes.

2019-04-14 Thread Paul Richard Thomas
Hi Thomas, Thanks a lot. Committed as revision 270353. I was determined not to repeat the PDT experience, which is still nagging at me. That has to be the next major gfc project, I guess. Regards Paul On Sun, 14 Apr 2019 at 18:08, Thomas Koenig wrote: > > Hi Paul, > > > > Please find attached

Re: AW: [Patch, fortran] PRs 89843 and 90022 - C Fortran Interop fixes.

2019-04-14 Thread Paul Richard Thomas
r than the element length. On Fri, 12 Apr 2019 at 10:08, Paul Richard Thomas wrote: > > Gilles & Reinhold, > > Following the discussion, I have decided to remove the copy-in for > intent(in). Dominique and I have located the problem with -m32 for > PR90022 and I am working on

Re: [patch] Fix PR 84487, large rodata increase in tonto and other programs

2019-04-13 Thread Paul Richard Thomas
Hi Thomas, Thanks for your determination in dealing with this. It has been on my TODO list for a long time but, like you at the outset, I had no idea how to deal with it. OK on the fortran side. Paul On Sat, 13 Apr 2019 at 19:48, Thomas Koenig wrote: > > Hello world, > > the attached patch fix

Re: AW: [Patch, fortran] PRs 89843 and 90022 - C Fortran Interop fixes.

2019-04-12 Thread Paul Richard Thomas
gt; > > Of more interest is the situation where the dummy argument in Fortran is > > declared, e.g., > > > > TYPE(*), ASYNCHRONOUS, INTENT(IN) :: BUF(..) > > > > The standard's semantics *forbids* performing copy-in/out in this case, > > IIRC. > > Otherwise >

Re: [Patch, fortran] PRs 89843 and 90022 - C Fortran Interop fixes.

2019-04-11 Thread Paul Richard Thomas
ecutes without failure for both -m32 and > -m64. > > Dominique > > > Le 10 avr. 2019 à 00:42, Paul Richard Thomas > > a écrit : > > > > Many thanks, sir! I will look into it. > > > > Paul > -- "If you can't explain it simply, you don't understand it well enough" - Albert Einstein

Re: [Patch, fortran] PRs 89843 and 90022 - C Fortran Interop fixes.

2019-04-09 Thread Paul Richard Thomas
Many thanks, sir! I will look into it. Paul On Tue, 9 Apr 2019 at 17:43, Dominique d'Humières wrote: > > Hi Paul, > > With your patch the test gfortran.dg/ISO_Fortran_binding_9.f90 fails in the > 32 bit mode, due to the errors > > /opt/gcc/work/gcc/testsuite/gfortran.dg/ISO_Fortran_binding_9.f9

[Patch, fortran] PRs 89843 and 90022 - C Fortran Interop fixes.

2019-04-09 Thread Paul Richard Thomas
The most part of this patch is concerned with implementing calls from C of of fortran bind c procedures with assumed shape or assumed rank dummies to completely fix PR89843. The conversion of the descriptors from CFI to gfc occur on entry to and reversed on exit from the procedure. This patch is s

Re: [Patch, fortran] PR87127 - External function not recognised from within an associate block

2019-03-31 Thread Paul Richard Thomas
Hi Dominique, I discovered the same thing myself this morning. The patch was developed on 8-branch because my working trunk had a hefty patch in an intermediate state of development. I cleared it off,ready to do the commit, and discovered the change on regtesting. I am trying to think of a way in

Re: [Patch, fortran] PR89841 - improper descriptor information passed to C

2019-03-30 Thread Paul Richard Thomas
inding_7.c: Additional source. PR fortran/89842 * gfortran.dg/ISO_Fortran_binding_8.f90: New test. * gfortran.dg/ISO_Fortran_binding_8.c: Additional source. On Wed, 27 Mar 2019 at 18:55, Steve Kargl wrote: > > On Wed, Mar 27, 2019 at 06:50:41PM +0000, Paul Richard Thomas wrote: &

[Patch, fortran] PR87127 - External function not recognised from within an associate block

2019-03-30 Thread Paul Richard Thomas
This patch is pretty self-explanatory. I have checked that a sensible errors are given if 'exfunc' in the testcase is referenced if it is a variable. Bootstrapped and regtested on FC29/x86_64 - OK for trunk? Paul 2019-03-30 Paul Thomas PR fortran/87127 * resolve.c (check_host_associa

[Patch, fortran] PR89841 - improper descriptor information passed to C

2019-03-27 Thread Paul Richard Thomas
This corrects a screw-up on my part. The attribute field of the CFI descriptor must be set by the formal argument in the interface and not the actual argument. Most of the work was in correcting Bootstrapped and regtested on FC29/x86_64 - OK for trunk? Cheers Paul 2019-03-27 Paul Thomas

Re: Further bugs in extended C interop

2019-03-27 Thread Paul Richard Thomas
Hi Reinhold, Many thanks - the bug number is out by one on the last. Jakub Jelnik got one in before it :-) I'll take a look this afternoon. Cheers Paul On Wed, 27 Mar 2019 at 10:25, Bader, Reinhold wrote: > > Dear Paul, > > Here are further bug reports, mostly on the various functions for man

[Patch, fortran] PR88247 - [8/9 Regression] ICE in get_array_ctor_var_strlen, at fortran/trans-array.c:2068

2019-03-24 Thread Paul Richard Thomas
This one started with a simple enough testscase and then evolved as I found out how little actually worked. All the changes in the patch involve gathering up the string length by hook or by crook. It will be noted that associate (y => x%d(:)(2:4)) still does not work correctly. The associate name

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

2019-03-24 Thread Paul Richard Thomas
Hi Thomas, This is OK for trunk and, after a wee delay for the other active branches. Thanks Paul On Fri, 22 Mar 2019 at 22:56, Thomas Koenig wrote: > > Hello world, > > the attached patch fixes a 7/8/9 regression. The problem was twofold: > If a subroutine was called more than once from a di

[Patch, fortran] PRs 89363 and 89364 - wrinkles with assumed rank

2019-03-10 Thread Paul Richard Thomas
The attached patch implements fixes for a couple of wrinkles with assumed rank: (i) PR89363 flagged the fact that the rank was not be set for assumed rank entities, associated with unallocated or unassociated arrays. The fix is straightforward, the work being done by trans-expr.c(set_dtype_for_unal

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

2019-03-03 Thread Paul Richard Thomas
Hi Thomas, This is good for trunk. Thanks Paul On Sun, 3 Mar 2019 at 09:46, Thomas Koenig wrote: > > Hello world, > > the attached patch fixes a 7/8/9 regression by rejecting an invalid > expression in coarray allocation that led to an ICE. It also adds a few > more checks. > > One point that

Re: [PATCH] Use RANGE_EXPR in Fortran array initializers some more (PR fortran/43210)

2019-02-26 Thread Paul Richard Thomas
Hi Jakub, Your timing is astonishing. This was next on my list of TODOs - not for this particular PR but to deal with the rodata bloat eg. 84487. I presume that this patch will make the latter go away? Yes, this is good for trunk and, if it fixes 84487, 8-branch as well. Thanks Paul On Mon, 25

Re: [patch, fortran] Fix PR 89174, segfault on allocate with MOLD

2019-02-24 Thread Paul Richard Thomas
Hi Thomas, > Of course, there could also be a more profound way of fixing this > bug :-) I wish that it were the case. I am unable to decide whether the design choices made for an F95 compiler have cause the add-ons to be intrinsically complicated or whether or whether F2018, extensions and legac

[Patch, fortran] PR88117 - [9 Regression] ICE in gimplify_var_or_parm_decl, at gimplify.c:2697

2019-02-23 Thread Paul Richard Thomas
This one was sufficiently 'obvious' that not only has it been committed to 9-branch but to 7- and 8-branches as well. Although the choking gimplifier was a regression, the testcase never worked on any branch because resolve.c:deferred_op_assign should always have returned false for pointer express

Re: [patch, fortran] Fix PR 89384

2019-02-19 Thread Paul Richard Thomas
Hi Thomas, That's just the job. OK for trunk. Thanks for the quick fix. Paul On Mon, 18 Feb 2019 at 22:03, Thomas Koenig wrote: > > Hello world, > > this patch fixes the 9 regression in C interop with contiguous > arguments recently reported by Reinhold Bader. > > ChangeLog and patch say it al

Re: [patch, fortran] Fix PR 71237

2019-02-10 Thread Paul Richard Thomas
OK. Thanks for the patch. Paul On Wed, 6 Feb 2019 at 20:27, Thomas Koenig wrote: > > Hello world, > > this patch fixes a 7/8/9 regression where we tried to accept invalid > code, which led to an ICE later on. > > The patch is rather straightforward. The reason why I could not > use gfc_expr_att

[Patch, fortran] PR89200 - [9 Regression] Erroneous copying of a derived type with a deferred-length character array component

2019-02-09 Thread Paul Richard Thomas
Committed as 'obvious' in revision 268721 after bootstrapping and regtesting. Even if not entirely obvious to the world at large, the patch is, in the words of Hitch Hikers Guide to the Galaxy, "mostly harmless". To explain the 'obviousness': Array and structure constructors make use of temporary

Re: [PR fortran/89077, patch] - ICE using * as len specifier for character parameter

2019-02-04 Thread Paul Richard Thomas
Hi Harald, After nearly 12 years, I have been found out! OK for trunk. Since it has been such a long time, I suggest that you limit your backporting efforts to 8-branch and, at the most, 7-branch. Will you attempt to tackle the other issues in the PR? Thanks Paul On Sun, 3 Feb 2019 at 21:04,

Re: [patch, fortran] Fix PR 88298

2019-02-02 Thread Paul Richard Thomas
OK - thanks for the patch. Paul On Sat, 2 Feb 2019 at 14:41, Thomas Koenig wrote: > > Hi, > > the attached patch fixes a 7/8/9 regression where a conversion warning > was emitted for DIM. The problem was that the no-warn flag had not been > passed down to the arithmetic conversion routines, whi

Re: [Patch, fortran] PR88393 - [7/8/9 Regression] [OOP] Segfault with type-bound assignment

2019-02-02 Thread Paul Richard Thomas
Unfortunately, it doesn't. I have taken it though since it should pretty low hanging fruit. Cheers Paul On Fri, 1 Feb 2019 at 19:31, Steve Kargl wrote: > > On Fri, Feb 01, 2019 at 06:15:21PM +, Paul Richard Thomas wrote: > > I will commit this patch as 'obvious

Re: [Patch, fortran] PR88393 - [7/8/9 Regression] [OOP] Segfault with type-bound assignment

2019-02-02 Thread Paul Richard Thomas
Hi Steve, > taking taking > OK OK > > Index: gcc/fortran/trans-expr.c > > === > > *** gcc/fortran/trans-expr.c (revision 268231) > > --- gcc/fortran/trans-expr.c (working copy) > > *** gfc_conv_procedure_call (gfc_se *

[Patch, fortran] PR88393 - [7/8/9 Regression] [OOP] Segfault with type-bound assignment

2019-02-01 Thread Paul Richard Thomas
I will commit this patch as 'obvious' tomorrow. Cheers Paul 2019-02-01 Paul Thomas PR fortran/88393 * trans-expr.c (gfc_conv_procedure_call): For derived entities, passed in parentheses to class formals, invert the order of copying allocatable components to taking taking the

[Patch, fortran] PR88980 - [9 regression] segfault on allocatable string member assignment

2019-02-01 Thread Paul Richard Thomas
This patch is rather simpler than it looks. The segfault was occurring because r264724 changed the array reference for cases like these to use pointer arithmetic to obtain the element. Unfortunately, in the case, the span field of the descriptor was not being set during the allocation of the compo

Re: [Patch, fortran] PR88685 - [8/9 regression] pointer class array argument indexing

2019-01-30 Thread Paul Richard Thomas
Sorry about the premature 'send'. This one is more or less obvious and is described in the ChangeLog. The key point is that full or section array references to intrinsic components were returning a false true from expr.c (is_subref_array). Returning false if a component is intrinsic and following

[Patch, fortran] PR88685 - [8/9 regression] pointer class array argument indexing

2019-01-30 Thread Paul Richard Thomas
This one is more or less obvious and is described in the ChangeLog. The key point is that full or section array references to intrinsic components were returning a false true from expr.c (is_subref_array). Returning false if a component is intrinsic and following anything other than an array elemen

Re: [PATCH] PR fortran/85780 -- alternate return and BIND(C) conflict

2019-01-24 Thread Paul Richard Thomas
Hi Steve, That's OK. Thanks Paul On Fri, 25 Jan 2019 at 01:50, Steve Kargl wrote: > > All, > > My original patch for this PR simply fixed an ICE, which > then allowed the code to compile. In reality, an alternate > return is not ISO C interoperable, so an error message is > a more appropriate

Re: [Patch, fortran] PR88929 - ICE on building MPICH 3.2 with GCC 9 with ISO_Fortran_binding

2019-01-23 Thread Paul Richard Thomas
Hi Steve, Fixed in revision 268231. This was a copy/paste/modify with the type built in. Have corrected both. > > tree > > + gfc_conv_descriptor_elem_len (tree desc) > > + { > > + tree tmp; > > + tree dtype; > > + > > + dtype = gfc_conv_descriptor_dtype (desc); > > + tmp = gfc_advance_c

[Patch, fortran] PR88929 - ICE on building MPICH 3.2 with GCC 9 with ISO_Fortran_binding

2019-01-23 Thread Paul Richard Thomas
The attached patch allows MPICH 3.2 to build correctly and to test successfully. Two problems were addressed: (i) The original implementation of ISO_Fortran_binding did not take account of the possibility that assumed rank/assumed type arrays could be passed as dummy arguments. This necessitated t

Re: ISO_Fortran_binding patch

2019-01-15 Thread Paul Richard Thomas
Hi everybody, I have done the minimum to make the testsuite failures to go away(thanks, Jakub) and to fix the first (offline) reported bug. Committed as r267946. As to the location of ISO_Fortran_binding_2.h, I am open to proposed fixes. Thomas kindly engineered that part of the original patch si

Re: ISO_Fortran_binding patch

2019-01-12 Thread Paul Richard Thomas
Done as revision 267884. Thanks again. Paul On Sat, 12 Jan 2019 at 18:29, Paul Richard Thomas wrote: > > Hi Steve, > > Many thanks for the heads up. I had seen similar problems with the the > second testcase and I thought that I had fixed them. I will delete > them from th

Re: ISO_Fortran_binding patch

2019-01-12 Thread Paul Richard Thomas
Jan 12, 2019 at 09:10:27AM -0800, Steve Kargl wrote: > > On Sat, Jan 12, 2019 at 03:28:02PM +, Paul Richard Thomas wrote: > > > Hi Thomas, > > > > > > Committed as revision 267881. I removed the duplicate include file and > > > added some documentation, a

Re: ISO_Fortran_binding patch

2019-01-12 Thread Paul Richard Thomas
Hi Thomas, Committed as revision 267881. I removed the duplicate include file and added some documentation, as suggested. Many thanks for all the help Paul On Tue, 8 Jan 2019 at 23:19, Thomas Koenig wrote: > > Hi Paul, > > > This is an updated version of the earlier patch. The main addition is

Re: [PATCH] PR fortran/61765 -- Avoid ENTRY names in check of repeditive symbols

2019-01-12 Thread Paul Richard Thomas
Hi Steve, This is OK for trunk. Thanks Paul On Sat, 12 Jan 2019 at 04:34, Steve Kargl wrote: > > The attached patch has been tested on x86_64-*-freebsd. There > were no regression. The patch is less then obvious, but simple. > OK to commit? > > 2019-01-11 Steven G. Kargl > > PR f

Re: [PATCH] PR fortran/35031 -- Check F2018:C1246

2019-01-11 Thread Paul Richard Thomas
Hi Steve, Yes, that's good for trunk. Thanks Paul On Fri, 11 Jan 2019 at 01:16, Steve Kargl wrote: > > An entry-name obtains the elemental attribute from its containing > procedure. F2018:C1546 prohibits an procedure from having a BIND(C) > attribute. BIND(C) can appear on the entry-stmt lin

Re: ISO_Fortran_binding patch

2019-01-09 Thread Paul Richard Thomas
Hi Thomas, Aaaah! Light bulb moment - I was looking in the $PREFIX/include directory. For whatever reason, mine does not appear in lib64 but in lib. OK, that will have to do for now because the patch is blocking my tree for a number of other things. I'll fix Bernhard's nit and commit on Saturday.

Re: ISO_Fortran_binding patch

2019-01-09 Thread Paul Richard Thomas
Hi Thomas, > Is there any particular reason why you do not want to use > > ! { dg-additional-options "-I $srcdir/../../libgfortran" } > > in the test cases, and have it only once in the source trees? I will make it so. Thanks for the reminder. > > However, I have no real strong opinion on this m

[Patch, fortran] PR77703 - [7/8/9 Regression] ICE on assignment to pointer function

2018-12-23 Thread Paul Richard Thomas
I will apply this as 'obvious' this evening, unless there are objections. The patch is entirely self-explanatory. Paul 2018-12-23 Paul Thomas PR fortran/77703 * resolve.c (get_temp_from_expr): Use the string length of constant character expressions. 2018-12-23 Paul Thomas

Re: [patch, fortran] Fix PR 85544

2018-12-22 Thread Paul Richard Thomas
Hi Thomas, That's OK for 7- through 9-branches. Thanks for the fix. Paul On Sun, 16 Dec 2018 at 22:01, Thomas Koenig wrote: > > Hello world, > > the PR pointed out an old regression because the front-end optimization > pass was substituting 2**n with ishift(1,n), where n was an array. > > Sim

[patch, fortran] PR87881 - gfortran.dg/inquiry_type_ref_(1.f08|3.f90) fail on darwin

2018-12-21 Thread Paul Richard Thomas
Applied as 'obvious' after regtesting on FC28/x86_64. The second part of the patch (in simplify_ref_chain) is due to Jakub, for which many thanks. The first is consequent on the need to deal with more than one inquiry part ref (see the testcase) and yet be able to return true from simplify_ref_cha

Implementation of F2018:18.4 C descriptors and ISO_Fortran_binding.h

2018-12-16 Thread Paul Richard Thomas
The attached is an implementation of ISO_Fortran_binding. Please note that the ChangeLogs contain no mention of the changes that appear in the configure files on building in maintainer mode. The patch only couples to assumed rank and assumed shape formal arguments of bind_c procedures, via trans-e

Re: [PATCH] Support simd function declarations via a pre-include.

2018-11-17 Thread Paul Richard Thomas
Hi All, Forget my remark about mp_prop_design.f90. ifort -parallel means just that and has nothing to do with vectorization. Sorry for the noise. Paul On Sat, 17 Nov 2018 at 13:29, Paul Richard Thomas wrote: > > Hi All, > > I took a few moments away from what I really must be doin

Re: *Ping* Fix PR 70260, ICE on invalid

2018-11-17 Thread Paul Richard Thomas
Hi Thomas, OK for trunk. Thanks for working on it. Paul On Sat, 17 Nov 2018 at 15:10, Thomas Koenig wrote: > > Hi, > > > the attached patch fixes both ICEs in the PR by adding some tests. > > It was necessary to shuffle around a bit of code, plus to make sure that > > double error reporting di

Re: [PATCH] Support simd function declarations via a pre-include.

2018-11-17 Thread Paul Richard Thomas
Hi All, I took a few moments away from what I really must be doing to try out an earlier version of the patch. There are quite a few CRs in the patch and the third chunk in gcc.c was rejected, although I cannot see why. I made a change to scanner.c to prevent the segfault that results from not hav

Re: [Patch, fortran] PR40196 - [F03] [F08] Type parameter inquiry (str%len, a%kind) and Complex parts (z%re, z%im)

2018-10-30 Thread Paul Richard Thomas
Hi Thomas, I tried failing cases of that kind; or assignment to len/kind part refs and returned correct errors. Must check where I was going wrong. Paul from a chilly Garching-bei-Muenchen On Sun, 28 Oct 2018, 13:38 Thomas Koenig Hi Paul, > > > >> inq would be easier to understand and unambigu

Re: [Patch, fortran] PR40196 - [F03] [F08] Type parameter inquiry (str%len, a%kind) and Complex parts (z%re, z%im)

2018-10-29 Thread Paul Richard Thomas
Hi Thomas, Thanks for finding the assignment a%len = 2 that escapes the check for lvalues. I am back home tomorrow night and will investigate why this one evades the trap. I think that an error test is needed in expr.c(gfc_check_assign). Cheers Paul On Sun, 28 Oct 2018 at 13:38, Thomas Koenig

<    1   2   3   4   5   6   7   8   9   10   >