Re: [Patch, Fortran] PR 58470: [4.9 Regression] [OOP] ICE on invalid with FINAL procedure and type extension

2014-02-06 Thread Mikael Morin
Le 06/02/2014 11:43, Janus Weil a écrit : > Hi all, > > attached is a small patch which fixes an ICE-on-invalid regression > with finalization. In the PR, Dominique objected to the patch, but I > think it's the correct thing to do after all. The line that I'm > removing was added in a patch author

Re: [Patch, Fortran] PR 58470: [4.9 Regression] [OOP] ICE on invalid with FINAL procedure and type extension

2014-02-07 Thread Mikael Morin
Le 06/02/2014 23:40, Janus Weil a écrit : > Hi Mikael, > > thanks for your comments ... > >>> attached is a small patch which fixes an ICE-on-invalid regression >>> with finalization. In the PR, Dominique objected to the patch, but I >>> think it's the correct thing to do after all. The line that

Re: [Patch, Fortran] PR 58470: [4.9 Regression] [OOP] ICE on invalid with FINAL procedure and type extension

2014-02-07 Thread Mikael Morin
Le 07/02/2014 21:42, Mikael Morin a écrit : > maybe add gcc_assert to > make it clear that fini->proc_tree should be set at this point. Or better: a comment ;-)

Re: [Bug fortran/60066] Bad elemental invocation of non-scalar base object

2014-02-07 Thread Mikael Morin
Le 07/02/2014 19:18, Paul Richard Thomas a écrit : > Dear All, > > I propose to add the attached to the testsuite. It is the testcase > from PR60066, which was fixed by the patch for PR59066. > > OK for trunk, 4.8 and 4.7? > Yes, sure. Mikael.

Re: [Patch, fortran] PR59026 - ELEMENTAL procedure with VALUE arguments emits wrong code

2014-02-08 Thread Mikael Morin
Le 08/02/2014 18:48, Paul Richard Thomas a écrit : > Dear All, > > This is another corner of a corner case that is not a regression but > fixes a wrong-code-on-valid. > > At present, an actual argument of an elemental procedure with the > VALUE attribute is not passed by value. The fix is obviou

[Patch, fortran] PR 59599 ICE on intrinsic ichar

2014-02-14 Thread Mikael Morin
s the gfc_intrinsic_argument_list_length function like it's done for other intrinsics. Regression tested on x86_64-unknown-linux-gnu. OK for trunk/4.8/4.7? Mikael 2014-02-14 Mikael Morin PR fortran/59599 * trans-intrinsic.c (gfc_conv_intrinsic_ichar): Calculate the

Re: [Patch, fortran] PR 59599 ICE on intrinsic ichar

2014-02-15 Thread Mikael Morin
Le 15/02/2014 11:04, Richard Biener a écrit : > On Fri, 14 Feb 2014, Mikael Morin wrote: > >> Hello, >> >> this bug is not a regression, but the patch shouldn't wreck the compiler >> too much on the other hand. >> The problem is a wrong number of argumen

Re: [Patch, fortran] PR51976 - [F2003] Support deferred-length character components of derived types (allocatable string length)

2014-02-22 Thread Mikael Morin
Le 19/02/2014 16:51, Janus Weil a écrit : > The patch was not applying cleanly any more, so here is a re-diffed > version for current trunk. It works nicely on the included test case > as well as the one provided by Walter Spector in comment 12 of the PR. > > Since, also in the current state, "cha

[Committed, fortran] PR 60341 invalid union access on string comparison optimization

2014-03-01 Thread Mikael Morin
= --- gcc/testsuite/ChangeLog (révision 208248) +++ gcc/testsuite/ChangeLog (révision 208249) @@ -1,3 +1,8 @@ +2014-03-01 Mikael Morin + + PR fortran/60341 + * gfortran.dg/str_comp_optimize_1.f90: New test. + 2014-03-01 Oleg Endo PR target/60071 Ind

Re: PR 60414: Patch proposal

2014-07-26 Thread Mikael Morin
Hello, thanks for your contribution. here are some comments about the patch: Le 21/07/2014 15:03, Andre Vehreschild a écrit : > diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog > index c33936b..cb01a13 100644 > --- a/gcc/fortran/ChangeLog > +++ b/gcc/fortran/ChangeLog Changelogs are pre

Re: [Patch, fortran] PR51976 - [F2003] Support deferred-length character components of derived types (allocatable string length)

2014-03-05 Thread Mikael Morin
Le 01/03/2014 16:58, Janus Weil a écrit : >>> Index: gcc/fortran/trans-stmt.c >>> === >>> --- gcc/fortran/trans-stmt.c (revision 207896) >>> +++ gcc/fortran/trans-stmt.c (working copy) >>> @@ -5028,6 +5028,11 @@ gfc_trans_allocate (g

[Patch, fortran] PR 60392 wrong descriptor when passing a transposed array to a contiguous assumed shape dummy.

2014-03-09 Thread Mikael Morin
, I have filled the matrices one element at a time in the testcase. 2014-03-09 Mikael Morin PR fortran/60392 * trans-array.c (gfc_conv_array_parameter): Don't reuse the descriptor if it has transposed dimensions. 2014-03-09 Mikael Morin PR fortran/60392 * gfortran.dg/transpose_

Re: patch fortran, pr 59746, internal compiler error : segmentation fault

2014-03-09 Thread Mikael Morin
Hello, Le 09/03/2014 13:59, jimmie.da...@l-3com.com a écrit : > > > The code would only remove a variable from a common block if it was just > defined in the previous statement. The PR showed a case where a pre-existing > variable was put in the common block. When it was not removed, the comm

Re: patch fortran, pr 59746, internal compiler error : segmentation fault

2014-03-09 Thread Mikael Morin
Le 09/03/2014 20:47, jimmie.da...@l-3com.com a écrit : > Comments from Mikael: > > #1. Please merge the two ifs; it seems they have exactly the same scope > after the patch. > > #2. This comment applies to the TOUPPER thing below... > .. so it should be put here. Also the indentation is wron

Re: [Patch, fortran] PR 60392 wrong descriptor when passing a transposed array to a contiguous assumed shape dummy.

2014-03-12 Thread Mikael Morin
Le 11/03/2014 10:25, Janus Weil a écrit : >> Regression-tested on x86_64-unknown-linux-gnu. >> This is not a regression as far as I know, but quite a severe >> wrong-code, albeit limited to the corner case of transpose and >> assumed shape and contiguous. OK for trunk/4.8/4.7 anyway ? > > I would

Re: patch fortran, pr 59746, internal compiler error : segmentation fault

2014-03-13 Thread Mikael Morin
Hello, Le 10/03/2014 03:15, jimmie.da...@l-3com.com a écrit : > Index: gcc/gcc/fortran/symbol.c > === > --- gcc/gcc/fortran/symbol.c (revision 208437) > +++ gcc/gcc/fortran/symbol.c (working copy) > @@ -3069,56 +3069,56 @@ > >

Re: [patch, fortran] Fix for PR 60522

2014-03-16 Thread Mikael Morin
Le 16/03/2014 11:41, Thomas Koenig a écrit : > Hello world, > > the attached patch fixes PR 60522, a regresseion where temporary > variables were incorrectly introduced in a BLOCK within a WHERE > statement. > > Regression-tested on x86_64-unknown-linux-gnu. > > OK for trunk and the other open

[committed, fortran] PR 60766 fix buffer overflow

2014-03-28 Thread Mikael Morin
Tobias for identifying the problem. Mikael Index: ChangeLog === --- ChangeLog (révision 208912) +++ ChangeLog (révision 208913) @@ -1,5 +1,11 @@ -2014-04-27 Thomas Koenig +2014-03-28 Mikael Morin + PR fortran/60677

Re: [Patch, fortran] PR60717 - Wrong code with recursive procedure with unlimited polymorphic dummy argument

2014-04-05 Thread Mikael Morin
Le 02/04/2014 22:29, Paul Richard Thomas a écrit : > Dear All, > > This fix, of itself, is quite obvious. The offset was being set to > zero for array segments, rather than that required for unity valued > lvalues. > > I think that the fix could be used to clean up: > > trans-expr.c(gfc_trans_a

Re: [Patch, Fortran] PRs 60495/58880: Fix issues with finalization expressions

2014-04-06 Thread Mikael Morin
Hello, Le 06/04/2014 18:05, Tobias Burnus a écrit : > Bernhard Reutner-Fischer wrote: >> On Sat, Apr 05, 2014 at 12:16:23AM +0200, Tobias Burnus wrote: >>> +bool has_final2 = false; >>> +if (!gfc_resolve_finalizers (c->ts.u.derived, &has_final)) >>> + return false; /* Err

Re: [Patch, Fortran] PRs 60495/58880: Fix issues with finalization expressions

2014-04-06 Thread Mikael Morin
Le 06/04/2014 19:46, Tobias Burnus a écrit : > Mikael Morin wrote: >> Le 06/04/2014 18:05, Tobias Burnus a écrit : >>> It is supposed to propagate the information whether any of the >>> components ("c") has a derived type. However, I made a typo: It &

Re: [Patch, Fortran] PRs 60495/58880: Fix issues with finalization expressions

2014-04-06 Thread Mikael Morin
Le 06/04/2014 20:30, Tobias Burnus a écrit : > Mikael Morin wrote: >> Argh. great. What about the use_assoc thing? Why is that needed? > > Frankly, I don't know. In terms of the code, the problem is that > attr.use_assoc is zero and, hence, the compiler generates a

Re: [Patch, Fortran] PR 54884 - Fix TREE_PUBLIC() issue with PRIVATE module procedures

2012-12-23 Thread Mikael Morin
Le 23/12/2012 15:29, Tobias Burnus a écrit : Please ignore that patch. I found a much simpler way, which is a tiny patch and actually also works for the commented part of the test case of the previous patch (i.e. the missed-optimization bit). Namely, I now simply only tag all the symbols which a

[Patch, fortran] PR55827 ICE with multiple fortran modules.

2013-01-03 Thread Mikael Morin
we want it on the branches as well? Mikael 2013-01-03 Steven G. Kargl Mikael Morin * class.c (gfc_fix_class_refs): Adapt ts initialization for the case e->symtree == NULL. * trans-expr.c (gfc_conv_function_expr): Init sym earlier. Use it. diff --

Re: [Patch, Fortran] PR55763 - reject MOLD with NULL() in init-data expressions

2013-01-04 Thread Mikael Morin
Hello, Le 04/01/2013 00:23, Tobias Burnus a écrit : NULL with MOLD should be rejected as (default) initialization expression. From F2008: R506 null-init is function-reference C512 (R506) The function-reference shall be a reference to the intrinsic function NULL with no arguments. "null-init" o

[Patch, fortran] PR fortran/42769 typebound call resolved incorrectly.

2013-01-05 Thread Mikael Morin
sted on x86_64-unknown-linux-gnu. OK for trunk? 4.7? 4.6? Mikael 2013-01-05 Mikael Morin PR fortran/42769 PR fortran/45836 PR fortran/45900 * module.c (read_module): Don't reuse local symtree if the associated symbol isn't exa

Re: [Patch, fortran] PR fortran/42769 typebound call resolved incorrectly.

2013-01-06 Thread Mikael Morin
Le 06/01/2013 13:06, Thomas Koenig a écrit : Am 06.01.2013 12:45, schrieb Janus Weil: I think your patch is indeed ok for trunk. Thanks, applied as revision 194949. 4.7? 4.6? Since it's not a regression, it does not necessarily need to be backported. However, the sort of wrong-code behavior

Re: [Patch, Fortran] PR55763 - improve init-data checks for pointers

2013-01-07 Thread Mikael Morin
Hello, Le 04/01/2013 13:51, Tobias Burnus a écrit : diff --git a/gcc/fortran/expr.c b/gcc/fortran/expr.c index 2610784..146154e 100644 --- a/gcc/fortran/expr.c +++ b/gcc/fortran/expr.c @@ -3291,22 +3291,21 @@ gfc_check_assign (gfc_expr *lvalue, gfc_expr *rvalue, int conform) gfc_try gfc_check

[Patch, fortran] PR47203 Use of module with same name as subroutine

2013-01-08 Thread Mikael Morin
condition in check_for_ambiguous. Regression tested on x86_64-unknown-linux-gnu. OK for trunk? Mikael 2013-01-08 Mikael Morin PR fortran/47203 * module.c (check_for_ambiguous): Get the current program unit using gfc_current_ns. diff --git a/module.c b/module.c index

Re: [Patch, Fortran] PR55758 - Non-C_Bool handling with BIND(C)

2013-01-09 Thread Mikael Morin
Le 09/01/2013 17:22, Tobias Burnus a écrit : However, I still believe that we should do something -std=gnu. Hm, reject? One can't declare a procedure with one type on one side, and another different type on the other side and expect things to work. We don't support passing integer as real, or

[Patch, fortran] PR53537 Explicit import of USE renamed symbol.

2013-01-10 Thread Mikael Morin
I don't forget). Does it sound good? Mikael fortran/ 2013-01-10 Tobias Burnus Mikael Morin PR fortran/53537 * symbol.c (gfc_find_sym_tree): Don't look for the symbol outside an interface block. (gfc_get_ha_symtree): Let gfc_fi

Re: [Patch, Fortran] PR 55072: [4.6/4.7/4.8 Regression] Missing internal_pack leads to wrong code with derived type

2013-01-11 Thread Mikael Morin
Le 10/01/2013 20:39, Janus Weil a écrit : Ping! (What do we do with this little bugger?) @Paul: Was your comment 19 in the PR meant as an OK for my patch (submitted here: http://gcc.gnu.org/ml/fortran/2012-12/msg00097.html), or was it just a general agreement with the previous comments? FWIW, I

Re: [libgomp / Fortran, Patch] PR55884 - Add -fintrinsic-module-path= and use it

2013-01-11 Thread Mikael Morin
Le 07/01/2013 16:07, Tobias Burnus a écrit : diff --git a/gcc/fortran/options.c b/gcc/fortran/options.c index e05b935..0e0a71d 100644 --- a/gcc/fortran/options.c +++ b/gcc/fortran/options.c @@ -845,6 +845,7 @@ gfc_handle_option (size_t scode, const char *arg, int value, break; case O

Re: [patch, Fortran] PR 55806 - Inefficient ANY with array constructors

2013-01-11 Thread Mikael Morin
Le 01/01/2013 21:18, Thomas Koenig a écrit : Hello world, the attached patch replaces ANY(a, b, c) with a .or. b .or c, leading to reduced execution time. It also handles ALL, PRODUCT and SUM. This fixes a bug noted by Michael Metcalf. Regression-tested. OK for trunk? A few comments below.

Re: [Patch, Fortran] PR 55072: [4.6/4.7/4.8 Regression] Missing internal_pack leads to wrong code with derived type

2013-01-11 Thread Mikael Morin
Le 11/01/2013 21:31, Janus Weil a écrit : Thanks for your review (which I read as an OK for all branches, right?). Well, from my point of view it is OK, but I was actually hoping Tobias would ack it himself.

Re: [patch, Fortran] PR 55806 - Inefficient ANY with array constructors

2013-01-14 Thread Mikael Morin
Le 13/01/2013 23:14, Thomas Koenig a écrit : Hi Mikael, thanks a lot for your comments! + actual_arglist->expr = gfc_copy_expr (e); + actual_arglist->next = gfc_get_actual_arglist (); Another one is needed. I get a segmentation fault with SUM. Fixed by using gfc_build_intrisic_call. Nice.

Re: testsuite: missing or wrong dg-* directives?

2013-01-14 Thread Mikael Morin
Le 13/01/2013 21:30, Harald Anlauf a écrit : On 01/12/13 22:02, Mikael Morin wrote: Le 08/01/2013 22:32, Harald Anlauf a écrit : On 12/28/12 21:49, Harald Anlauf wrote: Hello all, is there a default directive that is assumed when the testsuite is run? Running an "fgrep -L" on t

Re: testsuite: missing or wrong dg-* directives?

2013-01-14 Thread Mikael Morin
Le 14/01/2013 00:37, Manfred Schwarb a écrit : Am 14.01.2013 00:10, schrieb Manfred Schwarb: There are several other oddities: d_g-final, braces have to be separated by spaces. Want to send a patch? Not sure about the double braces in lto, I guess they act simply as single braces. I don't

Re: testsuite: missing or wrong dg-* directives?

2013-01-15 Thread Mikael Morin
Le 14/01/2013 23:16, Harald Anlauf a écrit : Attached there is a partial patch for the obvious parts, plus other missed cases (missing options). No failures, just a few more passes from the fixed dg-do run's. Thanks, applied as revision 195217. Mikael

Re: [Patch, Fortran] PR 54107: [4.8 Regression] Memory hog with abstract interface

2013-01-27 Thread Mikael Morin
Hi Janus, Le 27/01/2013 19:49, Janus Weil a écrit : subroutine sub (arg) procedure(sub) :: arg end subroutine You forgot to precise that this case (which is basically comment #4 in the PR) is *not* fixed by the patch, as it fails later on at translation stage. I have made up my min

[Patch, fortran] PR54107: ICE on recursive interfaces and PR54195: symbol bogusly inserted twice in the interface.

2013-02-03 Thread Mikael Morin
owing code. The second fix makes the recursion through resolve_symbol, so that the flag just added triggers and PR54195 is fixed. Regression tested on x86_64-unknown-linux-gnu. OK for trunk? Mikael 2013-02-03 Mikael Morin PR fortran/54107 PR fortran/54195 * gfortran

Re: [Patch, fortran] PR54107: ICE on recursive interfaces and PR54195: symbol bogusly inserted twice in the interface.

2013-02-04 Thread Mikael Morin
Le 04/02/2013 09:37, Janus Weil a écrit : >> - In PR54107(comment 26), the procedure result is a procedure pointer >> whose interface is the procedure itself, which leads to an infinite >> recursion during resolution. >> - In PR54195, a type's type bound procedures are resolved twice, leading >> to

Re: [Patch, fortran] PR54107: ICE on recursive interfaces and PR54195: symbol bogusly inserted twice in the interface.

2013-02-04 Thread Mikael Morin
Le 04/02/2013 14:02, Mikael Morin a écrit : >>> The fix, as discussed in PR54195, adds a flag to mark a symbol as >>> resolved. >> >> Why not add this flag directly to gfc_symbol instead of >> symbol_attribute? It seems we do not need the attribute for comp

[Patch, fortran] PR54107 ICE on recursive interface

2013-02-07 Thread Mikael Morin
nown-linux-gnu. OK for trunk? 2013-02-07 Mikael Morin PR fortran/54107 * trans-types.c (gfc_get_function_type): Change a NULL backend_decl to error_mark_node on entry. Detect recursive types. Build a variadic procedure type if the type is recursive. Restore t

Re: [Patch, fortran] PR54107 ICE on recursive interface

2013-02-08 Thread Mikael Morin
uite/ChangeLog === --- testsuite/ChangeLog (révision 195889) +++ testsuite/ChangeLog (révision 195890) @@ -1,3 +1,8 @@ +2013-02-08 Mikael Morin + + PR fortran/54107 + * gfortran.dg/recursive_interface_2.f90: New test. + 2013-02-08 Jakub Jelinek

Re: [patch][wwwdocs] gcc 4.8 changes - AMD new cores

2013-02-13 Thread Mikael Morin
Le 13/02/2013 09:32, Gopalasubramanian, Ganesh a écrit : > +Support for new AMD family 16h processors (Jaguar core) is now > available > + through -march=btver2 and -mtune=btver2 > options. s/btver2/bdver2/ ?

Re: [patch][wwwdocs] gcc 4.8 changes - AMD new cores

2013-02-13 Thread Mikael Morin
Le 13/02/2013 14:00, Richard Biener a écrit : > Of course not. Next they'll add blver ... Sorry

Re: [Patch, Fortran] PR56318 - Fix MATMUL regression

2013-02-15 Thread Mikael Morin
Le 14/02/2013 15:50, Tobias Burnus a écrit : > additionally, I tested and found > out that matrix-scalar/scalar-matrix was mishandled. Indeed, thanks. > > Build and regtested on x86-64-gnu-linux. > OK for the trunk and the 4.6 and 4.7 branches? OK. (obvious actually) Mikael

[Patch, fortran] [0/5] PR54730 ICE: confused by type-like fonctions

2013-02-19 Thread Mikael Morin
Hello, this is a fix for cases like: program main implicit none intrinsic :: real print *,(/ real(a = 1) /) end where `real(a = 1)' is initially parsed as a typespec, creating a symbol for 'a' along the way. The match fails, and then it is parsed as a constructor element and accepted that

[Patch, fortran] [2/5] PR54730 ICE: confused by type-like fonctions: Extract restore_old_symbol.

2013-02-19 Thread Mikael Morin
The ChangeLog says it all. 2013-02-15 Mikael Morin PR fortran/54730 * symbol.c (gfc_undo_symbols): Move code... (restore_old_symbol): ... here as a new function. diff --git a/symbol.c b/symbol.c index 2c122d0..4f1752d 100644 --- a/symbol.c +++ b/symbol.c @@ -2878,6

[Patch, fortran] [1/5] PR54730 ICE: confused by type-like fonctions: Move to the vec API.

2013-02-19 Thread Mikael Morin
This packs symbol.c's 'changed_syms' and 'tentative_tbp' variables into a new 'gfc_change_set' structure using the vec API. 2013-02-15 Mikael Morin PR fortran/54730 * Make-lang.in (F95_PARSER_OBJS): Add dependency to vec.h

[Patch, fortran] [3/5] PR54730 ICE: confused by type-like fonctions: Fix restore_old_symbol

2013-02-19 Thread Mikael Morin
This is a fix for what looks like a thinko. The other patches don't depend on it, so it can well wait for 4.9 if that is preferred. 2013-02-15 Mikael Morin PR fortran/54730 * symbol.c (restore_old_symbol): Fix thinko. diff --git a/symbol.c b/symbol.c index 4f1752d..e4

[Patch, fortran] [4/5] PR54730 ICE: confused by type-like fonctions: Support multiple change sets.

2013-02-19 Thread Mikael Morin
next patch. 2013-02-15 Mikael Morin PR fortran/54730 * gfortran.h (struct gfc_change_set): New field 'previous'. (gfc_new_checkpoint, gfc_drop_last_checkpoint, gfc_restore_last_checkpoint): New prototypes. * symbol.c (change_s

[Patch, fortran] [5/5] PR54730 ICE: confused by type-like fonctions: Fix gfc_match_array_constructor.

2013-02-19 Thread Mikael Morin
This is the fix for the PR. 2013-02-15 Mikael Morin PR fortran/54730 * array.c (gfc_match_array_constructor): Set a checkpoint before matching a typespec. Drop it on success, restore it otherwise. diff --git a/array.c b/array.c index 6787c05..b4a028b 100644 --- a

Re: [Patch, fortran] [00/14] PR fortran/50420 Support coarray subreferences

2011-10-18 Thread Mikael Morin
On Sunday 09 October 2011 18:25:25 Tobias Burnus wrote: > On 07.10.2011 16:38, Mikael Morin wrote: > > The full patchset has passed the fortran testsuite successfully. > > OK for trunk? > > OK for the whole patch set. Thanks for finding and fixing the issue! > Committed a

[Patch, fortran] [01/66] inline sum and product: Prepare gfc_trans_preloop_setup

2011-10-27 Thread Mikael Morin
2011-10-19 Mikael Morin * trans-array.c (gfc_trans_preloop_setup): Move array reference initialisation earlier. Factor subsequent array references. diff --git a/trans-array.c b/trans-array.c index 3472804..4b21476 100644 --- a/trans-array.c +++ b/trans-array.c @@ -2842,6

[Patch, fortran] [01..06/66] inline sum and product: Prepare gfc_trans_preloop_setup

2011-10-27 Thread Mikael Morin
This is a 6 steps program to update gfc_trans_preloop_setup. gfc_trans_preloop_setup appeared completely rewritten. These step by step patches show that it is not the case. Combined patch attached here. OK? diff --git a/trans-array.c b/trans-array.c index 3472804e4c6344e68d15af2feee627429ca61018..f

[Patch, fortran] [02/66] inline sum and product: Prepare gfc_trans_preloop_setup

2011-10-27 Thread Mikael Morin
2011-10-19 Mikael Morin * trans-array.c (gfc_trans_preloop_setup): Move code earlier. diff --git a/trans-array.c b/trans-array.c index 4b21476..91359e9 100644 --- a/trans-array.c +++ b/trans-array.c @@ -2876,6 +2876,17 @@ gfc_trans_preloop_setup (gfc_loopinfo * loop, int dim, int flag

[Patch, fortran] [04/66] inline sum and product: Prepare gfc_trans_preloop_setup

2011-10-27 Thread Mikael Morin
2011-10-19 Mikael Morin * trans-array.c (gfc_trans_preloop_setup): Remove redundant assertion. Special case outermost loop. diff --git a/trans-array.c b/trans-array.c index e3134f5..f5e30ae 100644 --- a/trans-array.c +++ b/trans-array.c @@ -2867,7 +2867,10

[Patch, fortran] [05/66] inline sum and product: Prepare gfc_trans_preloop_setup

2011-10-27 Thread Mikael Morin
This is for consistency. As dim == dimen-1 means "we are in the outermost loop", we should check against the loop dimension, not the array dimension. An assertion is added to check that it is in fact the same. OK? 2011-10-19 Mikael Morin * trans-array.c (gfc_trans_preloop_s

[Patch, fortran] [06/66] inline sum and product: Prepare gfc_trans_preloop_setup

2011-10-27 Thread Mikael Morin
2011-10-19 Mikael Morin * trans-array.c (gfc_trans_preloop_setup): Move common code... (add_array_offset): ...into that new function. diff --git a/trans-array.c b/trans-array.c index 476978e..f615e4e 100644 --- a/trans-array.c +++ b/trans-array.c @@ -2830,6 +2830,34

[Patch, fortran] [07..12/66] inline sum and product: Preliminary cleanups

2011-10-27 Thread Mikael Morin
This is a collection of independant and mostly trivial cleanups. I don't attach the combined patch as it is the concatenation of the separate patches. Patch 07: Useless coarray code removal. Patch 08: Remove redundant condition. Patch 09: Assertify condition. Patch 10: Use array dimensions instead

[Patch, fortran] [03/66] inline sum and product: Prepare gfc_trans_preloop_setup

2011-10-27 Thread Mikael Morin
2011-10-19 Mikael Morin * trans-array.c (gfc_trans_preloop_setup): Factor loop index initialization. diff --git a/trans-array.c b/trans-array.c index 91359e9..e3134f5 100644 --- a/trans-array.c +++ b/trans-array.c @@ -2863,16 +2863,15 @@ gfc_trans_preloop_setup (gfc_loopinfo

[Patch, fortran] [08/66] inline sum and product: Preliminary cleanups: Remove redundant condition.

2011-10-27 Thread Mikael Morin
As the first line of context shows, if the first condition is false, the second is false too. Thus, the first condition is useless. OK? 2011-10-19 Mikael Morin * trans-array.c (get_array_ref_dim): Remove redundant condition. diff --git a/trans-array.c b/trans-array.c index 83fa7b6

[Patch, fortran] [09/66] inline sum and product: Preliminary cleanups: Assertify condition.

2011-10-27 Thread Mikael Morin
2011-10-19 Mikael Morin * trans-array.c (gfc_trans_preloop_setup): Assertify one condition. diff --git a/trans-array.c b/trans-array.c index 5500ec4..8359af2 100644 --- a/trans-array.c +++ b/trans-array.c @@ -2885,8 +2885,7 @@ gfc_trans_preloop_setup (gfc_loopinfo * loop, int dim, int

[Patch, fortran] [10/66] inline sum and product: Preliminary cleanups: Use array's instead of loop's dimensions.

2011-10-27 Thread Mikael Morin
2011-10-19 Mikael Morin * trans-array.c (gfc_conv_ss_startstride): Access array bounds along array dimensions instead of loop dimensions. diff --git a/trans-array.c b/trans-array.c index 8359af2..f4d8a85 100644 --- a/trans-array.c +++ b/trans-array.c @@ -3347,9 +3347,11 @@ done

[Patch, fortran] [07/66] inline sum and product: Preliminary cleanups: Useless coarray code removal.

2011-10-27 Thread Mikael Morin
? 2011-10-19 Mikael Morin * trans-array.c (gfc_walk_array_ref): Skip coarray dimensions. diff --git a/trans-array.c b/trans-array.c index f615e4e..83fa7b6 100644 --- a/trans-array.c +++ b/trans-array.c @@ -7637,7 +7637,7 @@ gfc_walk_array_ref (gfc_ss * ss, gfc_expr * expr, gfc_ref * ref

[Patch, fortran] [11/66] inline sum and product: Preliminary cleanups: Skip temporary case.

2011-10-27 Thread Mikael Morin
as invalid content, so that we can update gfc_ss_info without caring about aliasing problems. OK? 2011-10-19 Mikael Morin * trans-array.c (gfc_conv_loop_setup): Also skip temporary arrays. diff --git a/trans-array.c b/trans-array.c index f4d8a85..cfbe909 100644 --- a/trans-array.c +++ b/tra

[Patch, fortran] [12/66] inline sum and product: Preliminary cleanups: Stop loop before end marker.

2011-10-27 Thread Mikael Morin
We should not be writing to gfc_ss_terminator. It is working without this patch because gfc_ss_terminator's next pointer is NULL, so the loop stops just after it, and because we are writing zero to gfc_ss_terminator, but it is already all zeros anyway. OK? 2011-10-19 Mikael

[Patch, fortran] [13..19/66] inline sum and product: Interfaces changes

2011-10-27 Thread Mikael Morin
This is another preliminary change, to update function interfaces requiring it, so that afterwards structures can be changed internally without impacting function interfaces. The main reason for these changes is that gfc_ss_info's dim and dimen fields are to be moved to struct gfc_ss. Thus function

[Patch, fortran] [13/66] inline sum and product: Interfaces changes: gfc_trans_array_constructor

2011-10-27 Thread Mikael Morin
ction is static, so it loses its gfc_ prefix along the way. OK? 2011-10-19 Mikael Morin * trans-array.c (gfc_trans_constant_array_constructor, trans_constant_array_constructor): Rename the former to the latter. Don't set the rank of the temporary for the loop. R

[Patch, fortran] [14/66] inline sum and product: Interfaces changes: gfc_trans_array_bound_check, gfc_conv_array_index_offset

2011-10-27 Thread Mikael Morin
their gfc_ prefix along the way. OK? 2011-10-19 Mikael Morin * trans-array.c (gfc_trans_array_bound_check, trans_array_bound_check): Rename the former to the latter. Replace descriptor argument with ss argument. Get descriptor from ss. (gfc_conv_array_index_offset

[Patch, fortran] [15/66] inline sum and product: Interfaces changes: obtain name more simply

2011-10-27 Thread Mikael Morin
This is a follow-up to the previous patch. It symplifies name obtention so that later we can change structs with less pain. :-) OK? 2011-10-19 Mikael Morin * trans-array.c (gfc_trans_array_bound_check): Use ss argument to get name. diff --git a/trans-array.c b/trans-array.c

[Patch, fortran] [16/66] inline sum and product: Interfaces changes: gfc_trans_create_temp_array

2011-10-27 Thread Mikael Morin
gfc_trans_create_temp_array uses dimensions heavily, and dimensions are to be moved from gfc_ss_info to gfc_ss. To have them still available in gfc_trans_create_temp_array, the gfc_ss_info argument should be a gfc_ss. OK? 2011-10-19 Mikael Morin * trans-array.h

[Patch, fortran] [17/66] inline sum and product: Interfaces changes: gfc_set_vector_loop_bounds

2011-10-27 Thread Mikael Morin
Same as previous patch, gfc_set_vector_loop_bounds uses dimensions, and thus needs a gfc_ss struct as argument. gfc_ prefix removed along the way. OK? 2011-10-19 Mikael Morin * trans-array.c (gfc_set_vector_loop_bounds, set_vector_loop_bounds): Rename the former to the latter

[Patch, fortran] [18/66] inline sum and product: Interfaces changes: get_array_ref_dim

2011-10-27 Thread Mikael Morin
Same as previous patch, get_array_ref_dim uses dimensions and thus needs a gfc_ss struct as argument. OK? 2011-10-19 Mikael Morin * trans-array.c (get_array_ref_dim): Change argument type and name. Obtain previous argument from the new argument in the body

[Patch, fortran] [19/66] inline sum and product: Interfaces changes: dim_ok

2011-10-27 Thread Mikael Morin
Same as previous patch, dim_ok uses dimensions and needs a gfc_ss struct as argument. The name is changed to the more descriptive transposed_dims and the logic is inverted (dim_ok <=> !transposed_dims). OK? 2011-10-19 Mikael Morin * trans-array.c (dim_ok, transposed_dims): Rena

[Patch, fortran] [20/66] inline sum and product: Update core structs: Rename gfc_ss_info.

2011-10-27 Thread Mikael Morin
This renames gfc_ss_info to gfc_array_info. OK? 2011-10-19 Mikael Morin * trans.h (struct gfc_ss_info, struct gfc_array_info): Rename the former to the latter. * trans-array.c (gfc_get_array_ss, gfc_trans_allocate_array_storage, get_array_ref_dim

[Patch, fortran] [21/66] inline sum and product: Update core structs: Move dim and dimen.

2011-10-27 Thread Mikael Morin
MP to GFC_SS_SECTION) made useless by the apperance of the very same initialization earlier in gfc_get_temp_ss. OK? 2011-10-19 Mikael Morin * trans.h (struct gfc_array_info): Move dim and dimen fields... (struct gfc_ss): ... here. Remove gfc_ss::data::temp::dimen field. *

[Patch, fortran] [22/66] inline sum and product: Update core structs: Move shape.

2011-10-27 Thread Mikael Morin
This moves shape field from gfc_ss to gfc_array_info. OK? 2011-10-19 Mikael Morin * trans.h (struct gfc_ss, struct gfc_array_info): Move shape field from the former struct to the latter. * trans-array.c (gfc_conv_ss_startstride, gfc_conv_loop_setup): Update

[Patch, fortran] [23/66] inline sum and product: Update core structs: Move type.

2011-10-27 Thread Mikael Morin
This moves type field from gfc_ss to a new gfc_ss_info struct. OK? 2011-10-19 Mikael Morin * trans.h (struct gfc_ss_info): New struct. (gfc_get_ss_info): New macro. (struct gfc_ss): Move type field to struct gfc_ss_info. Add an info field of type gfc_ss_info

[Patch, fortran] [25/66] inline sum and product: Update core structs: Move string_length.

2011-10-27 Thread Mikael Morin
This moves string_length field from gfc_ss to gfc_ss_info. OK? 2011-10-19 Mikael Morin * trans.h (struct gfc_ss, struct gfc_ss_info): Move field string_length from the former struct to the latter. * trans-array.c (gfc_get_temp_ss, gfc_trans_array_constructor

[Patch, fortran] [26/66] inline sum and product: Update core structs: Move scalar struct.

2011-10-27 Thread Mikael Morin
This moves data::scalar field from gfc_ss to gfc_ss_info. The expr subfield is renamed to value, as it is not the expression really, it is a reference to a variable containing the pre-calculated value. OK? 2011-10-19 Mikael Morin * trans.h (struct gfc_ss, struct gfc_ss_info): Move

[Patch, fortran] [27/66] inline sum and product: Update core structs: Move temp struct.

2011-10-27 Thread Mikael Morin
This moves data::temp field from gfc_ss to gfc_ss_info. OK? 2011-10-19 Mikael Morin * trans.h (struct gfc_ss, struct gfc_ss_info): Move member struct gfc_ss::data::temp into gfc_ss_info::data. * trans-array.c (gfc_get_temp_ss, gfc_conv_loop_setup): Update reference

[Patch, fortran] [29/66] inline sum and product: Update core structs: Move useflags flag.

2011-10-27 Thread Mikael Morin
This moves useflags field from gfc_ss to gfc_ss_info. OK? 2011-10-19 Mikael Morin * trans.h (struct gfc_ss, struct gfc_ss_info): Move field gfc_ss::useflags into gfc_ss_info. * trans-array.c (gfc_mark_ss_chain_used, gfc_trans_preloop_setup

[Patch, fortran] [28/66] inline sum and product: Update core structs: Move info struct.

2011-10-27 Thread Mikael Morin
This moves data::info field from gfc_ss to gfc_ss_info. The name is changed to array, as it is for all the non-scalar and non-temp cases, thus all the array cases. OK? 2011-10-19 Mikael Morin * trans.h (struct gfc_ss, struct gfc_ss_info): Move field gfc_ss::data::info into

[Patch, fortran] [30/66] inline sum and product: Update core structs: Move where flag.

2011-10-27 Thread Mikael Morin
This moves where field from gfc_ss to gfc_ss_info. OK? 2011-10-19 Mikael Morin * trans.h (struct gfc_ss, struct gfc_ss_info): Move field gfc_ss::where into gfc_ss_info. * trans-array.c (gfc_add_loop_ss_code): Update reference chains. * trans-stmt.c

[Patch, fortran] [24/66] inline sum and product: Update core structs: Move expr.

2011-10-27 Thread Mikael Morin
This moves expr field from gfc_ss to gfc_ss_info. OK? 2011-10-19 Mikael Morin * trans.h (struct gfc_ss, struct gfc_ss_info): Move field expr from the former struct to the latter. * trans-array.c (gfc_get_array_ss, gfc_get_scalar_ss

[Patch, fortran] [31/66] inline sum and product: Update the scalarizer: Split gfc_conv_loop_setup.

2011-10-27 Thread Mikael Morin
setup into functions of their own, so that they can be called recursively (later). To share gfc_conv_loop_setup's loopspec local variable in the three functions, we store it into gfc_loopinfo's specloop field (which existed, but was completely unused before). OK? 2011-10-1

[Patch, fortran] [32/66] inline sum and product: Update the scalarizer: clear specloop in gfc_trans_create_temp_arrays.

2011-10-27 Thread Mikael Morin
The code clearing specloop in gfc_conv_loop_setup would need some explanation. This patch moves it to gfc_trans_create_temp_array (where the reason for it are more clear) with a proper comment. OK? 2011-10-19 Mikael Morin * trans-array.c (gfc_conv_loop_setup

[Patch, fortran] [31..53/66] inline sum and product: Update the scalarizer.

2011-10-27 Thread Mikael Morin
This part of the serie takes care of updating the scalarizer code once its core structures have changed. There are basically two kinds of changes: - for functions working on loops mostly one needs to take care of more than one loop. This is done by attaching a list of nested loops to every g

[Patch, fortran] [33/66] inline sum and product: Update the scalarizer.

2011-10-27 Thread Mikael Morin
{ /* bleh */ } } Context diff with blank spaces ignored also attached. OK? 2011-10-19 Mikael Morin * trans-array.c (gfc_trans_create_temp_array): Move invariant condition out of the containing loop. diff --git a/trans-array.c b/trans-array.c index 545f2fb..663

[Patch, fortran] [35..39/66] inline sum and product: Update the scalarizer: New gfc_ss::loop field.

2011-10-27 Thread Mikael Morin
prepares patch 39 by adding a new variable total_dim which will be the sum of multiple nested loop dimensions so that the number of loop usages (through loop.dimen) is reduced. OK? 2011-10-19 Mikael Morin * trans.h (struct gfc_ss): New field loop. * trans-array.c (set_ss_loop): New

[Patch, fortran] [40..43/66] inline sum and product: Update the scalarizer: New gfc_ss::parent field.

2011-10-27 Thread Mikael Morin
) - set_vector_loop_bounds (patch 43) OK? 2011-10-19 Mikael Morin * trans.h (struct gfc_ss): New field parent. * trans-array.c (gfc_trans_scalarizing_loops): Skip clearing if a parent exists. * trans-expr.c (gfc_advance_se_ss_chain): Move to parent ss at the end of the

[Patch, fortran] [44/66] inline sum and product: Update the scalarizer: New gfc_ss::nested_ss field.

2011-10-27 Thread Mikael Morin
To be able, from one outer gfc_ss struct, to descend into the corresponding inner gfc_ss struct in the nested loop, this introduces a nested_ss field. OK? 2011-10-19 Mikael Morin * trans.h (struct gfc_ss): New field nested_ss. * trans-array.c (gfc_mark_ss_chain_used): Mark

[Patch, fortran] [34/66] inline sum and product: Update the scalarizer: gfc_ss_info refcounting

2011-10-27 Thread Mikael Morin
As there will be more than one gfc_ss struct pointing to a single gfc_ss_info, it needs to be reference counted. This introduces reference counting. OK? 2011-10-19 Mikael Morin * trans.h (struct gfc_ss_info): New field refcount. * trans-array.c (free_ss_info): Decrement

[Patch, fortran] [45/66] inline sum and product: Update the scalarizer: Update dimension mapping inversion functions.

2011-10-27 Thread Mikael Morin
nested loops: we have to start from the most nested array slice before calling the function. This patch also does that. OK? 2011-10-19 Mikael Morin * trans-array.c (get_array_ref_dim, get_scalarizer_dim_for_array_dim): Rename the former to the latter and loop over the

[Patch, fortran] [46/66] inline sum and product: Update the scalarizer: Update gfc_trans_create_temp_array.

2011-10-27 Thread Mikael Morin
This updates gfc_trans_create_temp_array with looking at parent (outer) ss. Context diff also provided. OK? 2011-10-19 Mikael Morin * trans-array.c (gfc_trans_create_temp_array): Loop over the parents. diff --git a/trans-array.c b/trans-array.c index d918fa8..1a86ae6 100644 --- a/trans

[Patch, fortran] [47..48/66] inline sum and product: Update the scalarizer: New gfc_loopinfo::nested_loop field.

2011-10-27 Thread Mikael Morin
This introduces the nested_loop list of nested loops inside a gfc_loopinfo struct (patch 47). Patch 48 adds to the scalarizer functions self-recursive calls on the nested loops. OK? 2011-10-19 Mikael Morin * trans.h (struct gfc_loopinfo): New fields nested and next. * trans

[Patch, fortran] [49..51/66] inline sum and product: Update the scalarizer: New parent loop.

2011-10-27 Thread Mikael Morin
This introduces a convenience pointer parent for the gfc_loopinfo struct (patch 49). Patches 50 and 51 (with context diff) use it to update gfc_trans_array_constructor and constant_array_constructor_loop_size respectively. OK? 2011-10-19 Mikael Morin * trans.h (struct gfc_loopinfo

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