Re: [patch, fortran] Fix PR 57023, packing for some array temporaries

2015-01-21 Thread Thomas Koenig
Hi Tobias, Thomas Koenig wrote: This patch takes the approach that any array bound which contains a dummy variable which is not INTENT(IN) may be changed by the user, and that we cannot be assured that it will not be changed. How about sym-attr.flavor == FL_PARAMETER? I am not sure

[patch, fortran] Fix PR 57023, packing for some array temporaries

2015-01-20 Thread Thomas Koenig
is sensible should be using INTENT(IN) for array bounds, anyway :-) So, here is the patch. Regression-tested. OK for all affected branches? Thomas 2015-01-20 Thomas Koenig tkoe...@netcologne.de PR fortran/57023 * dependency.c (callback_dummy_intent_not_int): New function

*ping* [patch, fortran] Fix for PR 47676

2015-01-05 Thread Thomas Koenig
Am 30.12.2014 um 01:25 schrieb Thomas Koenig: Hello world, this patch fixes the long-standing bug. A missing temporary causes an invalid read in realloc_on_assign_5.f03 which only becomes noticable when setting MALLOC_CHECK_ or when using valgrind. The bug has three duplicates

Re: [patch, fortran] Fix for PR 47676

2015-01-05 Thread Thomas Koenig
Am 05.01.2015 um 19:55 schrieb H.J. Lu: On Linux/x86, I got ../../src-trunk/gcc/fortran/frontend-passes.c: In function ‘int realloc_string_callback(gfc_code**, int*, void*)’: ../../src-trunk/gcc/fortran/frontend-passes.c:152:38: error: ‘gfc_discard_nops’ was not declared in this scope

[committed, fortran] Test case for PR 65563

2015-03-29 Thread Thomas Koenig
I have committed the test case from PR 65563 as obvious, since the bug appears to have been fixed some time ago. 2015-03-29 Thomas Koenig tkoe...@gcc.gnu.org PR libgfortran/65563 * gfortran.dg/open_errors_2.f90: New test. Regards Thomas ! { dg-do run } ! { dg-shouldfail

Re: [patch, fortran] PR 37131

2015-04-21 Thread Thomas Koenig
into it? 2015-04-19 Thomas Koenig tkoe...@gcc.gnu.org PR fortran/37131 * gfortran.h (gfc_isym_id): Add GFC_ISYM_FE_RUNTIME_ERROR. (gfc_array_spec): Add resolved flag. (gfc_intrinsic_sym): Add vararg. * intrinsic.h (gfc_check_fe_runtime_error): Add prototype

[Patch, Fortran] Simplify lbound

2015-04-25 Thread Thomas Koenig
covered. Regression-tested. OK for trunk? 2015-04-25 Thomas Koenig tkoe...@gcc.gnu.org PR fortran/37131 * simplify.c (simplify_bound): Get constant lower bounds from array spec for assumed shape arrays. 2015-04-25 Thomas Koenig tkoe...@gcc.gnu.org PR fortran

Re: [Patch, Fortran] Simplify lbound

2015-05-03 Thread Thomas Koenig
Hi Mikael, Looks good. In general, it is better to restrict changes to existing test cases to the necessary minimum that they still pass, and add new code to new test cases. This makes regressions easier to track. So, OK with that change. Thomas

Re: [Patch, fortran] Simplify lbound for array subcomponents

2015-05-01 Thread Thomas Koenig
Am 27.04.2015 um 13:17 schrieb Mikael Morin: Hello, while reviewing Thomas' bound simplification patch, I noticed that the {l,u}bound simplification code wasn't handling array subcomponents. Fixed by the attached patch, regression tested. OK for trunk? Hi Mikael, the patch is OK. Thanks!

Re: [Patch, Fortran] Simplify lbound

2015-04-27 Thread Thomas Koenig
Thomas Koenig tkoe...@gcc.gnu.org PR fortran/37131 * simplify.c (simplify_bound): Get constant lower bounds of one from array spec for assumed and explicit shape shape arrays if the lower bounds are indeed one. 2015-04-25 Thomas Koenig tkoe...@gcc.gnu.org

Re: [Patch, Fortran] Simplify lbound

2015-04-27 Thread Thomas Koenig
Hello world, here is a slight correction: This patch includes the change to the test case. Regards Thomas Index: fortran/simplify.c === --- fortran/simplify.c (Revision 222431) +++ fortran/simplify.c (Arbeitskopie) @@

Re: [Patch, fortran] PR 37131, inline matmul

2015-05-06 Thread Thomas Koenig
Hi Mikael, thanks for the review. I have committed the following, which took your remarks into account (plus an additional test case, as obvious). Regards Thomas 2015-05-06 Thomas Koenig tkoe...@gcc.gnu.org PR fortran/37131 * gfortran.h (gfc_isym_id): Add

Re: [Patch, Fortran] Simplify lbound

2015-05-10 Thread Thomas Koenig
obviously do no harm), but anyway: OK for trunk? Regards Thomas 2015-05-10 Thomas Koenig tkoe...@gcc.gnu.org PR fortran/66041 PR fortran/37131 * gfortran.h (gfc_array_spec): Add field resolved. * array.c (gfc_resolve_array_spec): Resolve array spec

[patch, Fortran, committed] Fixed test case

2015-05-03 Thread Thomas Koenig
2015-05-03 Thomas Koenig tkoe...@gcc.gnu.org PR fortran/37131 * gfortran.dg/bound_9.f90: Add pointer assignment.

[Patch, fortran] PR 37131, inline matmul

2015-05-05 Thread Thomas Koenig
Hello world, this is an update of the matmul inline patch. The only difference to the last version is that it has the ubound simplification taken out. Any further comments? OK for trunk? Thomas 2015-05-05 Thomas Koenig tkoe...@gcc.gnu.org PR fortran/37131

Re: [patch, Fortran] Fix PR 66041

2015-05-09 Thread Thomas Koenig
made in the callers. This is independant from the rest, so it can be made later as a follow-up. Done (all in once). I have attached the new patch (in which I also restructured the test), plus the test cases. OK for trunk? Thomas 2015-05-08 Thomas Koenig tkoe...@gcc.gnu.org

Re: [patch, Fortran] Fix PR 66041

2015-05-10 Thread Thomas Koenig
Hi Mikael, thanks for the review. Here is what I committed. Regards Thomas 2015-05-10 Thomas Koenig tkoe...@gcc.gnu.org PR fortran/66041 * frontend-passes.c (scalarized_expr): Set correct dimension and shape for the expression to be passed to lbound. Remove

[patch, Fortran] Fix PR 66041

2015-05-08 Thread Thomas Koenig
Hello world, this patch fixes the regression in PR 66041, plus one more case that came up when I looked at this. OK for trunk? Regards, Thomas 2015-05-08 Thomas Koenig tkoe...@gcc.gnu.org PR fortran/66041 * frontend-passes.c (scalarized_expr): Clear as-start, as-end

Re: [Patch, Fortran] Simplify lbound

2015-05-12 Thread Thomas Koenig
Hi Mikael, To be honest, both patches look fragile to me. Yours because it leaves gfc_current_ns to its value, leaving the door open to other problems. Mine, well, because it's playing with a global variable, with the possible side-effects this could have. However, without a better idea,

[patch, fortran] Fix PR 66111

2015-05-12 Thread Thomas Koenig
Hello world, this patch fixes a regression from the inline matmul patch by not inlining a case that is not yet handled, namely vector subscripts. Regression-tested. OK for trunk? Regards Thomas 2015-05-12 Thomas Koenig tkoe...@gcc.gnu.org PR fortran/66111

[patch, fortran] Fix PR 66113 error with deeply nested blocks

2015-05-16 Thread Thomas Koenig
Hello world, this (rather obvious) patch fixes array declarations in deeply nested BLOCKs. Regression-tested. OK for trunk? Thomas 2015-05-16 Thomas Koenig tkoe...@gcc.gnu.org PR fortran/66113 * expr.c (is_parent_of_current_ns): New function

[patch, fortran] Inline matmul with conjugate complex numbers

2015-05-17 Thread Thomas Koenig
Hello world, this patch extends the inline matmul functionality to conjugate complex numbers. Regression-tested. OK for trunk? Regards Thomas 2015-05-17 Thomas Koenig tkoe...@gcc.gnu.org PR fortran/66176 * frontend-passes.c (check_conjg_variable): New function

Re: [patch, fortran, RFC] First steps towards inlining matmul

2015-04-11 Thread Thomas Koenig
Hi Mikael, Still to do: Bounds checking (a rather big one), ... as you do a front-end to front-end transformation, you get bounds checking for free, don't you? Only partially. What the patch does is integer i,j,k c = 0 do j=0, size(b,2)-1 do k=0, size(a, 2)-1

Re: [patch, fortran, RFC] First steps towards inlining matmul

2015-04-11 Thread Thomas Koenig
OK, here is a new version. There is now an option for setting a maximum on the array size, which takes its default from the BLAS limit (if specified). Currently, only setting the maximum size to zero as a way of disabling the unrolling is supported. I have done this in a few test cases. The

[fortran] New version of matmul inline patch

2015-04-15 Thread Thomas Koenig
Hello world, here is the newest version of the matmul patch. This also honors the -finline-matmul-limit= option, either at compile-time or at run-time. Question: What to do about run-time bounds checking? I am leaning towards making an intrinsic subroutine which can not be called by the user,

[patch, fortran, RFC] First steps towards inlining matmul

2015-04-05 Thread Thomas Koenig
Thomas Koenig tkoe...@gcc.gnu.org * frontend-passes.c (create_var): Add optional argument vname as part of the name. Split off block creation into (insert_block): New function. (cfe_expr_0): Use fcn as part of tempoary name. (optimize_namesapce): Call

Re: [patch, fortran, RFC] First steps towards inlining matmul

2015-04-05 Thread Thomas Koenig
Hi Dominique, IMO the inlining of MATMUL should be restricted to small matrices (less than 4x4, 9x9 or 16x16 depending of your field!-) The problem with the library function we have is that it is quite general; it can deal with all the complexity of assumed-shape array arguments. Inlining

Re: [patch, fortran, RFC] First steps towards inlining matmul

2015-04-05 Thread Thomas Koenig
Hi Jerry, I am curious about what performance gain results from this? I can see saving a library call to our runtime libraries. Do you have some timing results? The speedup can be quite drastic for small matrices which can be completely unrolled by -O3: b1.f90: program main use b2

Re: [patch, fortran, RFC] First steps towards inlining matmul

2015-04-05 Thread Thomas Koenig
Hi Dominique, which means that -fexternal-blas should disable the inlining. It is not surprising that a higly tuned BLAS library is better than a simple inlining for large matrices. I did some tests by adjusting n; it seems the inline version is faster for n=22, which is not too bad.

[patch, fortran] PR 37131

2015-04-19 Thread Thomas Koenig
However, I think the patch is useful as it is now, and can go into trunk. So: OK for trunk? Thomas 2015-04-19 Thomas Koenig tkoe...@gcc.gnu.org PR fortran/37131 * gfortran.h (gfc_isym_id): Add GFC_ISYM_FE_RUNTIME_ERROR. (gfc_array_spec): Add resolved flag

[patch, fortran] Committed two additional test cases

2015-05-17 Thread Thomas Koenig
Hello world, I have committed the two test cases below as obviously correct after testing. They stress bounds checking on matmul by having an argument whose size cannot be predicted at compile-time. Regards Thomas 2015-05-17 Thomas Koenig tkoe...@gcc.gnu.org PR fortran

Re: [patch, fortran] PR 47359 - warnings for constant conversion

2015-06-06 Thread Thomas Koenig
Am 01.06.2015 um 22:10 schrieb Steve Kargl: c) Warn for print *,3.1415926535 with -Wconversion-extra and don't warn for print *,3.141592653589_4 This would be my first choice. If a user actually specifies a suffix, I assume that the user has given some thought to the

[patch, fortran] Fix PR 66385, array constructors in FORALL

2015-06-04 Thread Thomas Koenig
to install the gcc 5 branch...) There would be an alternative, in principle, to put the BLOCK around the FORALL, but frankly, I don't think it is worth spending the effort and complicating the code. Regards Thomas 2015-06-11 Thomas Koenig tkoe...@gcc.gnu.org PR fortran/66385

[patch, fortran, committed] fix PR 58749

2015-06-04 Thread Thomas Koenig
Hello world, the attached patch fixes the PR by adding a charlen to the function expression of adjustl and adjustr. Committed as obvious after regression-testing. Regards Thomas 2015-06-04 Thomas Koenig tkoe...@netcologne.de PR fortran/58749 * iresolve.c

*Ping* patch, fortran] Warn about constant integer divisions

2015-06-21 Thread Thomas Koenig
*ping* https://gcc.gnu.org/ml/gcc-patches/2015-06/msg00966.html Hello world, the attached patch emits a warning for constant integer division. While correct according to the standard, I cannot really think of a legitimate reason why people would want to write 3/5 where they could have

Re: [Patch, fortran, PR44672, v10] [F08] ALLOCATE with SOURCE and no array-spec

2015-06-11 Thread Thomas Koenig
Hi Andre, please find attached an updated version of the patch. This patch simplifies some cases and ensures more straight line code. Furthermore was a bug in the interfacing routine for the _vptr-_copy() routine removed, where not the third and fourth arguments translated to be passed be

Re: Documentation complex logarithm https://gcc.gnu.org/onlinedocs/gfortran/LOG.html

2015-06-14 Thread Thomas Koenig
{-\pi \leq \omega \leq \pi}. +@math{-\pi \omega \leq \pi}. @item @emph{Example}: @smallexample 2015-06-14 Thomas Koenig tkoe...@gcc.gnu.org * intrinsic.texi: Change \leq to in descrition of imaginary part in argument to log.

[patch, fortran] Warn about constant integer divisions

2015-06-13 Thread Thomas Koenig
Hello world, the attached patch emits a warning for constant integer division. While correct according to the standard, I cannot really think of a legitimate reason why people would want to write 3/5 where they could have written 0 , so my preference would be to put this under -Wconversion (like

[patch, fortran] PR 47359 - warnings for constant conversion

2015-05-31 Thread Thomas Koenig
do so if the consensus is that this is better. It might also be possible to invent another name for this option, and maybe enable this with -Wsurprising. Regression-tested. Comments? OK for trunk? Thomas 2015-05-31 Thomas Koenig tkoe...@netcologne.de PR fortran/47359

Re: [patch, fortran] PR 47359 - warnings for constant conversion

2015-06-01 Thread Thomas Koenig
Hi Steve, The second part catches the case when the user supplies more digits than appropriate for the number. More often than not, this is a KIND error. Does the above issue warnings for real(knd), parameter :: pi = 3.1415926535897932384626433832795029_knd module foomod

Re: [patch, fortran] PR 47359 - warnings for constant conversion

2015-06-01 Thread Thomas Koenig
Am 01.06.2015 um 15:40 schrieb Steve Kargl: On Mon, Jun 01, 2015 at 08:34:24AM +0200, Thomas Koenig wrote: What would be the peferred alternative? Is it possible to detect the _knd suffix? Yes, this is possible. If so, no warning is my preference as it is never incorrect to specify more

Re: [Patch, fortran, pr65548, addendum] [5/6 Regression] gfc_conv_procedure_call

2015-05-27 Thread Thomas Koenig
Hi Andre, Because this patch is obvious I plan to commit it tomorrow if no one objects?! The patch itself is obviously OK. About the test case: In general, it is better not to change existing test cases unless absolutely necessary (e.g. adjust an error message). This makes it easier to track

Re: [Patch, fortran, PR44672, v6] [F08] ALLOCATE with SOURCE and no array-spec

2015-05-29 Thread Thomas Koenig
Hi Andre, just a couple of remarks. You are adding significant new code to an existing test case, allocate_with_source_3.f90. As discussed previously, it would be better to put the new code into an extra test case. The following test case segfaults with your patch with an invalid free: module

Re: [PATCH] PR fortran/66545 -- Fix NULL pointer dereference

2015-07-01 Thread Thomas Koenig
Hi Steve, The attached patch avoid the dereference of a NULL pointer, and thereby avoids an ICE. Regression tested on trunk. OK to commit? OK. Thanks for the patch! Thomas

[patch, wwwdocs, committed] Document -Winteger-division for Fortran

2015-07-01 Thread Thomas Koenig
Hello world, I just committed the following patch to the WWW docs. An error was reported by Gerald's script, but that seems to have been spurious. At least, there was no error on revalidation. Regards Thomas 2015-07-01 Thomas Koenig tkoe...@netcologne.de * gcc-6

Ping ** 0.5 patch, fortran] Inline matmul with conjugate complex numbers

2015-05-21 Thread Thomas Koenig
Am 18.05.2015 um 00:05 schrieb Thomas Koenig: this patch extends the inline matmul functionality to conjugate complex numbers. Regression-tested. OK for trunk? OK (with the trivial change in the follow-up e-mail)? I'd like to start extending this to TRANSPOSE(CONJG(A)) :-) Thomas

Re: Ping ** 0.5 patch, fortran] Inline matmul with conjugate complex numbers

2015-05-21 Thread Thomas Koenig
Hi Mikael, There is little that is specific to conjg (any elemental function would work roughly the same), but anyway, the patch is OK. Conjg has the advantage that it is an extremely cheap function - essentially zero cost. For an arbitrary elemental function, we would have to think about

Re: [Patch, fortran] PR 37131, inline matmul

2015-07-22 Thread Thomas Koenig
Hi Mikael, However, it introduces regressions on matmul_bounds_{2,4,5}. It seems the incorrect extent runtime errors are completely optimized away (even at -O0). Any ideas? This is seriously wierd. It seems that the call to gfortran_error is really optimized away, because the middle-end

Re: [Patch, fortran] PR 37131, inline matmul

2015-07-21 Thread Thomas Koenig
Am 21.07.2015 um 19:26 schrieb Mikael Morin: Le 20/07/2015 23:55, Thomas Koenig a écrit : Hi, I'm back from holiday, so I can finally reply. Am 13.07.2015 um 21:54 schrieb Thomas Schwinge: --- gcc/fortran/iresolve.c +++ gcc/fortran/iresolve.c @@ -2207,6 +2207,9

Re: [Patch, fortran] PR 37131, inline matmul

2015-07-20 Thread Thomas Koenig
Hi, I'm back from holiday, so I can finally reply. Am 13.07.2015 um 21:54 schrieb Thomas Schwinge: --- gcc/fortran/iresolve.c +++ gcc/fortran/iresolve.c @@ -2207,6 +2207,9 @@ gfc_resolve_fe_runtime_error (gfc_code *c) a-name = %VAL; c-resolved_sym = gfc_get_intrinsic_sub_symbol

Re: [PATCH] PR fortran/67885 -- PARAMETER needs to be marked in BLOCK

2015-10-27 Thread Thomas Koenig
Hi Steve, When an specification statement in a BLOCK construct has a PARAMETER attribute, gfortran currently discards the entity. This patch marks PARAMETER entity if in a BLOCK. I'm not complete convince that this is the right fix, but it does allow the testcase to compile and run. Built and

Re: [PATCH] PR fortran/36192 -- yet another fix for an ICE

2015-10-29 Thread Thomas Koenig
Am 29.10.2015 um 19:35 schrieb Steve Kargl: The patch for PR fortran/36192 that I committed here: https://gcc.gnu.org/ml/gcc-bugs/2015-10/msg02160.html cured an ICE for a testcase that was reduced from the originally submitted mutilated Fortran code. The original code could in fact invoke

Re: [PATCH] PR fortran/68283 -- remove a rogue gfc_internal_error()

2015-11-14 Thread Thomas Koenig
Hi Dominique, (1) Why is this block reached when compiling with -ffrontend-optimize, but not with -fno-frontend-optimize (Thomas)? The problem here is that gfc_variable_attr is called (indirectly) during optimize_assignment. In this case, this causes the ICE because of the existing error

Re: [Patch, libgfortran] PR68987 [5/6 Regression] double free or corruption in _gfortran_st_write_done

2015-12-27 Thread Thomas Koenig
Hi Jerry, Attached patch eliminate this problem by reverting a portion of the previous patch to pr65089. Regression tested on x86_64-Linux. I will add test case from the PR. OK for trunk and then back port to 5x? Both. Thanks a lot for the patch! Thomas

Re: [Patch, pr69011, fortran, v1] [6 Regression] [OOP] ICE in gfc_advance_chain for ALLOCATE with SOURCE

2015-12-28 Thread Thomas Koenig
Hi Andre, for bug pr69011 I like to propose the attached patch. The patch fixes the ICE and furthermore makes sure, that for this case of referencing a polymorphic object the correct vtype is selected. Previously the declared vtype of the source=-expression was taken for the object(s) to

Re: [PATCH] Fix Fortran ICE due to realloc_string_callback bug (PR fortran/71204)

2016-05-20 Thread Thomas Koenig
Hi Jakub, We ICE at -O0 while compiling the testcase below, because we don't reset two vars that are reset in all other places in frontend-passes.c when starting to process an unrelated statement. Without this, we can emit some statement into a preexisting block that can be elsewhere in the

Re: [patch, Fortran] Fix some string temporaries

2016-07-21 Thread Thomas Koenig
Am 21.07.2016 um 20:00 schrieb H.J. Lu: On Tue, Jul 19, 2016 at 2:27 PM, Thomas Koenig <tkoe...@netcologne.de> wrote: Here is the pacth the way I committed it. This caused: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71961 As usual for SPEC errors: Please provide a test case. R

[patch, Fortran] Fix PR 71902

2016-08-14 Thread Thomas Koenig
positives). It also checks for the presence of a substring on the RHS expression, because the problem cannot happen if there is no RHS substring. Regression-tested on trunk. OK for trunk? Also OK for a backport? Regards Thomas 2016-08-14 Thomas Koenig <tkoe...@gcc.gnu.org>

Re: [patch, Fortran] Fix some string temporaries

2016-07-17 Thread Thomas Koenig
Hi Mikael, Do we actually want to backport this? Technically, it is a regression, but people are not likely to notice much. It is not an ICE, neither a code correctness issue as far as I can see, so I would rather not backport. Fine with me. +case GFC_DEP_FORWARD: +

Re: [patch, Fortran] Fix some string temporaries

2016-07-18 Thread Thomas Koenig
Am 18.07.2016 um 20:58 schrieb Mikael Morin: Unfortunately not. The original code (before I lifted out the functionality) sometimes had GFC_DEP_ERROR at the end of the function, which was then removed by return fin_dep == GFC_DEP_OVERLAP; That is very strange, there is an assert just a

Re: [patch, Fortran] Fix some string temporaries

2016-07-19 Thread Thomas Koenig
Thomas Koenig <tkoe...@gcc.gnu.org> PR fortran/71902 * dependency.c (gfc_check_dependency): Use dep_ref. Handle case if identical is true and two array element references differ. (gfc_dep_resovler): Move most of the code to dep_ref. (dep_ref): New fu

[patch, Fortran] Fix some string temporaries

2016-07-16 Thread Thomas Koenig
for trunk? Do we actually want to backport this? Technically, it is a regression, but people are not likely to notice much. Regards Thomas 2016-07-16 Thomas Koenig <tkoe...@gcc.gnu.org> PR fortran/71902 * dependency.c (gfc_check_dependency): Use dep_ref. Handl

[patch, fortran] Fix PR 71783

2016-07-09 Thread Thomas Koenig
Thomas 2016-07-09 Thomas Koenig <tkoe...@gcc.gnu.org> PR fortran/71783 * frontend-passes.c (create_var): Always allocate a charlen for character variables. 2016-07-09 Thomas Koenig <tkoe...@gcc.gnu.org> PR fortran/71783 *

Re: [Fortran, Patch, PR72698, v1] [5/6/7 Regression] ICE in lhd_incomplete_type_error, at langhooks.c:205

2016-08-08 Thread Thomas Koenig
Am 07.08.2016 um 13:52 schrieb Andre Vehreschild: Hi Andre, attached patch fixes the ICE caused by a zero-sized string. Assigning that string to a temporary variable obviously did not work out. The patch fixes this by checking for zero-sized strings in SOURCE= and not producing the code to

Re: Ping [Fortran, Patch, pr70524, v1] [5/6/7 Regression] ICE when using -frepack-arrays -Warray-temporaries

2016-08-08 Thread Thomas Koenig
Hi Andre, the patch is OK. Ping. Regards Thomas

[Patch, fortran, committed] Fix PR 71795

2016-07-22 Thread Thomas Koenig
Hello world, I have committed the attached patch as obvious and simple after regression-testing. This fixes a regression. Will commit to the other affected branches shortly. Regards Thomas 2016-07-22 Thomas Koenig <tkoe...@gcc.gnu.org> PR fortran/71795 * fr

[patch, fortran, committed] Set deferred flag on typespec for temporary strings

2016-08-15 Thread Thomas Koenig
) in the typespec were not output to the dump of the Fortran AST, I have also added this. I will backport to 6 and 5 in a few days. Regards Thomas 2016-08-15 Thomas Koenig <tkoe...@gcc.gnu.org> * frontend-passes.c (create_var): Set ts.deferred for deferred-length cha

Re: Ping! Re: [PATCH, Fortran] New flag -finit-derived to initialize components of derived types

2016-08-15 Thread Thomas Koenig
Hi Fritz, Still waiting on a review for this patch. Comments/concerns from all are welcome. The patch looks fine to me. OK for trunk, and thanks for the patch! Regards Thomas @Gerald: Will a gcc-7/changes.html file be generated? If so, we should document this new flag (and

Re: [patch, Fortran] Fix PR 71902

2016-08-18 Thread Thomas Koenig
ses actual performance issues. Regards Thomas 2016-08-18 Thomas Koenig <tkoe...@gcc.gnu.org> PR fortran/71902 * frontend-passes.c (realloc_string_callback): Check for deferred on the expression instead for allocatable on the symbol. Name temporary

Re: [PATCH v4] libgfortran: Replace mutex with rwlock

2023-10-22 Thread Thomas Koenig
Hi Lipeng, Sure, as your comments, in the patch V6, I added 3 test cases with OpenMP to test different cases in concurrency respectively: 1. find and create unit very frequently to stress read lock and write lock. 2. only access the unit which exist in cache to stress read lock. 3. access the

Re: Fortran: Use non conflicting file extensions for intermediates [PR81615]

2023-12-30 Thread Thomas Koenig
Replying to myself... I think this also desevers a mention in changes.html.  Here is something that I came up with.  OK? Or does anybody have suggestions for a better wording? Or maybe this is better: diff --git a/htdocs/gcc-14/changes.html b/htdocs/gcc-14/changes.html index

Re: Fortran: Use non conflicting file extensions for intermediates [PR81615]

2023-12-30 Thread Thomas Koenig
Hi Rimvydas, Documentation part. The makeinfo gcc/fortran/gfortran.texi does not seem to have any new warnings. Thanks for your work on this! I think this also desevers a mention in changes.html. Here is something that I came up with. OK? Or does anybody have suggestions for a better

[patch, fortran] Fix PR 59604

2014-04-12 Thread Thomas Koenig
Hello world, please find attached a patch for PR 59604. The patch makes sure that, if -fno-range-check is specified, using int on an overflowing boz constant yields the same result for compile-time simplification and run-time execution. OK for trunk? Thomas 2014-03-12 Thomas Koenig

*ping*: [patch, fortran] Fix PR 59604

2014-04-25 Thread Thomas Koenig
simplification and run-time execution. OK for trunk? Thomas 2014-03-12 Thomas Koenig tkoe...@gcc.gnu.org PR fortran/59604 * gfortran.h (gfc_convert_mpz_to_signed): Add prototype. * arith.c (gfc_int2int): Convert number to signed if arithmetic

Re: [patch, fortran] Fix PR 59604

2014-04-27 Thread Thomas Koenig
Hi Tobias, Am 12.04.2014 21:33, schrieb Thomas Koenig: please find attached a patch for PR 59604. The patch makes sure that, if -fno-range-check is specified, using int on an overflowing boz constant yields the same result for compile-time simplification and run-time execution. OK

[patch, Fortran] Fix PR 60834

2014-05-10 Thread Thomas Koenig
Hello world, this contains a straightforward fix for the regression by not trying to do combine array constructors inside association lists. Regression-tested. OK for all affected open branches? Thomas 2014-05-10 Thomas Koenig tkoe...@gcc.gnu.org PR fortran/60834

[patch, fortran] Fix for PR 60522

2014-03-16 Thread Thomas Koenig
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 branches? Thomas 2014-04-16 Thomas Koenig tkoe

[patch, Fortran] Fix PR 60522

2014-03-25 Thread Thomas Koenig
Hello world, the attached patch fixes the regression (after some thought of what might still be optimized, which isn't much :-) Regression-tested. OK for trunk? Thomas 2014-04-25 Thomas Koenig tkoe...@gcc.gnu.org PR fortran/60522 * frontend-passes.c (cfe_code): Do

Re: [patch, fortran] use vec in frontend-passes.c

2014-08-26 Thread Thomas Koenig
Hi Tobias, first, thanks Trevor for the first round of review! Also thanks from my side! I still see: - expr_count = 0; + expr_array.truncate (0); Is there is a reason for not using release() here? No, changed in the committed version. Regards Thomas

Re: [FORTRAN PATCH] Two -Wlogical-not-parentheses fixes (PR fortran/62270)

2014-09-02 Thread Thomas Koenig
Am 02.09.2014 17:32, schrieb Tobias Burnus: Marek Polacek wrote: This patch fixes the last two spots where -Wlogical-not-parentheses warns. See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=62270#c3 if you want more info about the changes. Bootstrapped/regtested on x86_64-linux, ok for

Re: [PATCH] Fix whitespace in comments.

2014-09-20 Thread Thomas Koenig
Hi Joost, A somewhat trivial patch to cleanup whitespace issues in comments: sed s/\. \*\//\. \*\//g Tested with a recompile only. Ok for trunk ? OK. (Obvious, really). Thomas

[patch, Fortran] Fix PR 55593

2012-12-08 Thread Thomas Koenig
Hello world, the attached patch fixes a regression introduced with the recent checking for DO loop variables when they are used with a generic subroutine where the generic name matches one of the actual names. Regression-tested. OK for trunk? Thomas 2012-12-08 Thomas Koenig tkoe

Re: [patch, Fortran] Fix PR 55593

2012-12-08 Thread Thomas Koenig
Am 08.12.2012 17:39, schrieb Janus Weil: Hi Thomas, the attached patch fixes a regression introduced with the recent checking for DO loop variables when they are used with a generic subroutine where the generic name matches one of the actual names. Regression-tested. OK for trunk? A few

Re: [patch, Fortran] Fix PR 55593

2012-12-09 Thread Thomas Koenig
Hi Janus, 2012/12/8 Thomas Koenig tkoe...@netcologne.de: Because undeclared is not declared, the resolution doesn't happen, and resolved_sym is NULL. This is OK because an error has been raised about this anyway; good, if it only happens when an error has been raised, I think your patch

[patch, libfortran] Fix PR 30162, write with pipes

2012-12-15 Thread Thomas Koenig
Hello world, the attached patch fixes the regression and regtests cleanly. No test case because I could not find anything portable to create a FIFO in the testsuite. OK for trunk and 4.7? Thomas 2012-12-15 Thomas Koenig tkoe...@gcc.gnu.org PR libfortran/30162 * io

*ping* [patch, libfortran] Fix PR 30162, write with pipes

2012-12-20 Thread Thomas Koenig
Ping? Thomas Hi Janus, Oops, right. Here is the correct one. Regards Thomas wrong patch attached? It contains a hunk in frontend-passes.c, which seems totally unrelated ... Cheers, Janus 2012/12/15 Thomas Koenig tkoe...@netcologne.de: Hello world, the attached patch

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

2013-01-01 Thread Thomas Koenig
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? Thomas 2013-01-01 Thomas Koenig tkoe...@gcc.gnu.org

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

2013-01-06 Thread Thomas Koenig
Am 06.01.2013 12:45, schrieb Janus Weil: Since it's not a regression, it does not necessarily need to be backported. However, the sort of wrong-code behavior seen in comment #24 is severe enough that it might justify backporting. I leave that up to you. FWITW, I think it should be backported

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

2013-01-06 Thread Thomas Koenig
Ping? http://gcc.gnu.org/ml/fortran/2013-01/msg0.html 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?

*ping* [patch, Fortran] PR 55806 - Inefficient ANY with array constructors

2013-01-08 Thread Thomas Koenig
Ping**2? This was submitted before the review, so I think it should still be OK. Ping? http://gcc.gnu.org/ml/fortran/2013-01/msg0.html 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.

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

2013-01-13 Thread Thomas Koenig
,2) - b(i,2)) acc, abs(a(i,3) - b(i,3)) acc, lo(i,:)])) cycle c = c + i end do into the test case. Updated test case and patch attached. OK for trunk? Thomas 2013-01-13 Thomas Koenig tkoe...@gcc.gnu.org PR fortran/55806 * frontend

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

2013-01-14 Thread Thomas Koenig
Am 14.01.2013 14:29, schrieb Mikael Morin: Le 13/01/2013 23:14, Thomas Koenig a écrit : OK for trunk? OK with the changes suggested above. Thanks. Committed as rev. 195179 with your changes. Thanks a lot for the thorough review! Thomas

[patch, fortran] Fix PR 55919

2013-01-20 Thread Thomas Koenig
? Thomas 2013-01-20 Thomas Koenig tkoe...@gcc.gnu.org PR fortran/55919 * add_path_to_list: Copy path to temporary and strip trailing directory separators before calling stat(). 2013-01-20 Thomas Koenig tkoe...@gcc.gnu.org PR fortran/55919

Re: [patch, fortran] Fix PR 55919

2013-01-21 Thread Thomas Koenig
Hi Steve, The patch looks OK to me. As this is a Windows, hopefully someone will confirm that the patch fixes the Windows issue before you commit. Thanks! Committed as rev. 195348 after Brad's confirmation that the patch works on Windows. One more regression down, 24 to go. Thomas

Re: [Patch, libfortran] Improve performance of byte swapped IO

2013-01-22 Thread Thomas Koenig
Hi Janne, PING**2 this is OK. Thanks a lot for the work you put into this! Thomas

[patch, fortran] Fix PR 50627

2013-01-27 Thread Thomas Koenig
Hello world, the attached patch fixes the regression regarding freeing namespaces twice. The test cases where also run unter valgrind without producing errors. Regression-tested. OK for trunk? Thomas 2013-01-27 Thomas Koenig tkoe...@gcc.gnu.org PR fortran/56054

Re: [patch, fortran] Fix PR 50627

2013-01-27 Thread Thomas Koenig
Of course, that should be PR 50627 in the ChangeLog.

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

2013-01-27 Thread Thomas Koenig
Am 27.01.2013 21:16, schrieb Mikael Morin: Or maybe wait for the fix for comment #4? I would rather commit the fixes now, just on general principles. If any regression should occur, it would be easier to pinpoint the reason. Thomas

Re: [Patch, fortran] PR56008 (and PR47517) [F03] wrong code with lhs-realloc on assignment with derived types having allocatable components

2013-01-28 Thread Thomas Koenig
Hi Paul, This patch is sufficiently straightforward that the ChangeLog entry describes it completely. The fix for both bugs lay in the nullification of the allocatable components of the newly (re)allocated array. I think this fix is OK for trunk, for the reasons you mentioned. I also think

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

2013-01-28 Thread Thomas Koenig
Hi Janus, Or maybe wait for the fix for comment #4? Rather not (technically it's a separate issue, I guess). While the patch is rather large, I think it is OK. One request: Could you add a comment to gfc_sym_get_dummy_args explaining what the function does and under which conditions

  1   2   3   4   5   6   7   8   9   10   >