[patch, libfortran] Use macros for dtype in array intrinsics

2018-01-06 Thread Thomas Koenig
rank information and to put in more status information, we should just need to change the macros. Regression-tested. OK for trunk? Regards Thomas 2018-01-06 Thomas Koenig * libgfortran.h (GFC_DTYPE_COPY): New macro. (GFC_DTYPE_COPY_SETRANK): New macro

Re: [patch, fortran] Simplify eoshift

2018-01-04 Thread Thomas Koenig
I wrote: here is a patch for simplifying eoshift. Along the way, I discovered two ICEs caused by wrong arguments to eoshift, which are now also caught by new checks and a corresponding test case. This already passed all of the *eoshift* tests and is regression-testing as I write this.  OK if it

[patch, fortran] Simplify eoshift

2018-01-04 Thread Thomas Koenig
if it passes? Regards Thomas 2018-01-04 Thomas Koenig PR fortran/83683 PR fortran/45689 * check.c (gfc_check_eoshift): Check for string length and for conformance of boundary. * intrinsic.c (add_functions): Add gfc_simplify_eoshift

Re: [PATCH] PR 78534 Change character length from int to size_t

2018-01-03 Thread Thomas Koenig
Hi Janne, attached is a patch that makes the two attached testcases work. It applies on top of the charlen->size_t patch. In the formatted I/O stuff, I have mostly used ptrdiff_t to avoid having to deal with signed/unsigned issues, as the previous code was using int. Did you regression-test?

[patch, fortran] Fix PR 83664, missing check on boundary argument for eoshift

2018-01-03 Thread Thomas Koenig
Hello world, the attached patch fixes a missing check for eoshift. If you're wondering what the "else" belongs to - it is if (boundary != NULL) Regression-tested. OK for trunk? Regards Thomas 2018-01-03 Thomas Koenig PR fortran/83664

Re: [patch, fortran, committed] Fix PR 83650 on gcc-7

2018-01-02 Thread Thomas Koenig
Am 02.01.2018 um 19:00 schrieb Thomas Koenig: Hello world, I have committed the patch below as obvious to fix the same bug on gcc-7 that my recent patch fixed on trunk. ... of course, better with a patch which includes the changes instead of the ChangeLog entries: Index: fortran/simplify.c

[patch, fortran, committed] Fix PR 83650 on gcc-7

2018-01-02 Thread Thomas Koenig
Hello world, I have committed the patch below as obvious to fix the same bug on gcc-7 that my recent patch fixed on trunk. 2018-01-02 Thomas Koenig PR fortran/83650 * simplify.c (gfc_simplify_cshift): Correct contition for negative shifts. 2018-01-02 Thomas Koenig

[patch, fortran] Complete implementation and correction of simplification

2018-01-02 Thread Thomas Koenig
I will address separately. Regression-tested. OK for trunk? Regards Thomas 2018-01-02 Thomas Koenig PR fortran/45689 PR fortran/83650 * simplify.c (gfc_simplify_cshift): Re-implement to allow full range of arguments. 2018-01-02 Thomas Koenig

Re: [PATCH] PR libgfortran/83649 Chunk large reads and writes

2018-01-02 Thread Thomas Koenig
Hi Janne, +#define MAX_CHUNK 2147479552 Two things to discuss: Should this also be backported to the 7-branch? Also, we could set the default subrecord length for unformatted I/O to the same value. Save a syscall :-) What do you think? Regards Thomas

Re: [PATCH] PR 78534 Change character length from int to size_t

2017-12-31 Thread Thomas Koenig
Hi Janne, FWIW, by changing your example to use unformatted I/O, it works correctly. Not for me (again, on gcc110): program main character(len=2_8**33), parameter :: a = "" write (10) a end program main with strace results in open("fort.10", O_RDWR|O_CREAT|O_CLOEXEC, 0666) = 3 fstat(3,

[patch, fortran] Implement simplification of minloc and maxloc

2017-12-31 Thread Thomas Koenig
, so I wrote new functions (mostly copying the old ones). This closes a significant hole in F2003 - with this implemented, only finalization is left as only partially implemented. Regression-tested. OK for trunk? Regards Thomas 2017-12-31 Thomas Koenig PR fortran/45689

Re: [PATCH] PR 78534 Change character length from int to size_t

2017-12-30 Thread Thomas Koenig
Hi Janne, To be honest, I haven't really done much testing with big strings, so far my focus has been on getting the existing testsuite to pass and getting the ABI right. I agree that some of the test cases can be fixed later. However, I would really prefer if the I/O worked, because that is v

Re: [PATCH] PR 78534 Change character length from int to size_t

2017-12-30 Thread Thomas Koenig
Hi Janne, In order to handle large character lengths on (L)LP64 targets, switch the GFortran character length from an int to a size_t. Just running some tests on gcc110 (the big-endian PPC machine from the compile farm). Something does not seem to work with I/O with long strings. With progr

Re: [patch, lingfortran] Bug 83560 - list-directed formatting of INTEGER is missing plus on output

2017-12-29 Thread Thomas Koenig
Hi Jerry, OK for trunk? Looks good, thanks for the patch! Looking at the number of test cases, namelist has to be one of the most complicated things in all of Fortran... Regards Thomas

Re: [PATCH] Use pointer sized array indices.

2017-12-29 Thread Thomas Koenig
Hi Janne, Using pointer sized variables (e.g. size_t / ptrdiff_t) when the variables are used as array indices allows accessing larger arrays, and can be a slight performance improvement due to no need for sign or zero extending, or masking. Unless I have missed something, all the examples are

Re: [Patch, fortran] PR83076 - [8 Regression] ICE in gfc_deallocate_scalar_with_status, at fortran/trans.c:1598

2017-12-27 Thread Thomas Koenig
Hi Damian, Does breaking binary compatibility simply mean that CAF codes will need to be recompiled (which is fine) Well... not really. We are not supposed to break binary compatibility in a release. For gcc-8, we have greater freedom because we had to do it anyway. Now, the interesting que

Re: [Patch, fortran] PR83076 - [8 Regression] ICE in gfc_deallocate_scalar_with_status, at fortran/trans.c:1598

2017-12-27 Thread Thomas Koenig
Hi Paul, by the way, the patch is OK for trunk. It is just gcc-7 that I am worried about. Regards Thomas

Re: [Patch, fortran] PR83076 - [8 Regression] ICE in gfc_deallocate_scalar_with_status, at fortran/trans.c:1598

2017-12-27 Thread Thomas Koenig
Hi Paul, It will break binary compatibility for caf with scalar, allocatable/pointer components. This comes about because I decided that the caf tokens for thes components, should come after all other components, rather than immediately after the "owner" component. This has the advantage, that t

Re: [Patch, fortran] PR83076 - [8 Regression] ICE in gfc_deallocate_scalar_with_status, at fortran/trans.c:1598

2017-12-27 Thread Thomas Koenig
Hi Paul, This is a complete rework of the patch and of the original mechanism for adding caf token fields and finding them. In this patch, the token fields are added to the derived types after all the components have been resolved. This is done so that all the tokens appear at the very end of t

[patch, fortran] Fix PR 83540

2017-12-26 Thread Thomas Koenig
Hello world, this rather self-explanatory patch makes sure we don't get an error using reallocation on assignment for inlining matmul when we don't have reallocation on assignment. Regression-tested. OK for trunk? Regards Thomas 2017-12-25 Thomas Koenig PR for

Re: [patch, lingfortran] Bug 83560 - list-directed formatting of INTEGER is missing plus on output

2017-12-25 Thread Thomas Koenig
Hi Jerry, OK for trunk? OK. Thanks for the patch. And: Merry Christmas to everybody! Thomas

Re: [PATCH] Add NON_RECURSIVE attribute for procedures

2017-12-22 Thread Thomas Koenig
Hi Janne, I think, in general, our current system where -std=gnu means roughly "everything we have implemented so far, except legacy extensions that break standards conformance" is pretty good. The problem that I see with implementing this change is stack space, especially the traditionally li

Re: [PATCH] Add NON_RECURSIVE attribute for procedures

2017-12-20 Thread Thomas Koenig
Hi Janne, I think you need a few more test cases, like (compile with -fcheck=all and -std=f2018): module foo contains subroutine f(n) call g(n-1) end subroutine f subroutine g(n) if (n<0) return call f(n-1) end subroutine g end module foo program main use foo call f(10) e

Re: [patch, libgfortran] Memory issues related to PR78549

2017-12-12 Thread Thomas Koenig
Hi Jerry, Ping: If no objection, I will commit to trunk on Wednesday evening. OK for trunk (even before that :-) Thanks for the patch! Regards Thomas

[patch, fortran, doc, committed] Update description of MINLOC and MAXLOC

2017-12-11 Thread Thomas Koenig
Hi, I have just committed the attached doc patch as obvious after "make dvi" and "make pdf". 2017-12-11 Thomas Koenig * intrinsic.texi (MAXLOC): Update documentation for character arrays and KIND argument. (MINLOC): Likewise. Regards

Re: [patch, fortran] Implement maxval for characters

2017-12-11 Thread Thomas Koenig
I have created https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83379 and assigned it to myself. This should be easy to fix. OK, I have updated the test cases in question. They pass for me at least. I'll keep the PR open for a couple of days to make sure this is really fixed. Regards T

Re: [patch, fortran] Implement maxval for characters

2017-12-11 Thread Thomas Koenig
Christophe and James (and everybody else), I have created https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83379 and assigned it to myself. This should be easy to fix. Regards Thomas

[patch, fortran] Implement Maxval in compile-time-constants

2017-12-10 Thread Thomas Koenig
? Regards Thomas 2017-12-10 Thomas Koenig PR fortran/45689 * simplify.c (min_max_choose): Add prototype. (gfc_count): Format correctly. (simplify_transformation): Pass array argument to init_result_expr. (gfc_simplify_minval_maxval): Remove

Re: PING [RFC gfortran] PR53478 - gfortran segfaults when module name clashes with C binding name of procedure

2017-12-10 Thread Thomas Koenig
Hi Dominique, Patch waiting for comment at https://gcc.gnu.org/ml/fortran/2017-11/msg00067.html OK. Thanks for the patch! Regards Thomas

Re: [PATCH] PR fortran/82934,83318 -- Enforce F2008:C631

2017-12-09 Thread Thomas Koenig
Hi Steve, The attached patch enforces F2008:C631, which of course is /* F2008:C631 (R626) A type-param-value in a type-spec shall be an asterisk if and only if each allocate-object is a dummy argument for which the corresponding type parameter is assumed. */ Regression tested on x86_6

[patch, fortran] Fix PR 83316

2017-12-08 Thread Thomas Koenig
Hello world, the attached patch fixes a case where simplification wasn't done correctly for maxval and minval with character variables. Regression-tested. OK for trunk? Regards Thomas 2017-12-08 Thomas Koenig PR fortran/83316 * arith.c (gfc_character2char

Re: Ping**(5./7.) [patch, fortran] Implement maxval for characters

2017-12-03 Thread Thomas Koenig
Am 03.12.2017 um 20:59 schrieb Jerry DeLisle: On 12/03/2017 01:48 AM, Thomas Koenig wrote: Am 28.11.2017 um 19:40 schrieb Thomas Koenig: Hello world, the attached patch implements maxval for characters, an F2003 feature that we were missing up to now. Regression-tested on x86_64-pc-linux-gnu

Ping**(5./7.) [patch, fortran] Implement maxval for characters

2017-12-03 Thread Thomas Koenig
Am 28.11.2017 um 19:40 schrieb Thomas Koenig: Hello world, the attached patch implements maxval for characters, an F2003 feature that we were missing up to now. Regression-tested on x86_64-pc-linux-gnu. OK for trunk? Ping?

[patch, fortran, committed] Fix part 2 of PR 83224

2017-12-01 Thread Thomas Koenig
Hello world, I have committed the fix for the second part (and original test case) of PR 83224 as obvious after regression-testing as r255331. Regards Thomas 2017-12-01 Thomas Koenig PR fortran/83224 * frontend-passes.c (create_var): Also handle character

Re: Patch to fix an undefined behavior in fortran/decl.c

2017-12-01 Thread Thomas Koenig
HI Quing, this is a very straightforward fix for an undefined behavior in fortran/decl.c: > - sprintf (name, "%s_%d", name, kind_value); > + sprintf (name + strlen (name), "_%d", kind_value); OK for trunk. Thanks for the patch! Regards Thomas

[patch, fortran, committed] Fix PR 83224

2017-11-30 Thread Thomas Koenig
Hello world, I just committed the attached patch as obvious and simple to trunk, r255294. Regards Thomas 2017-12-01 Thomas Koenig PR fortran/83224 * frontend-passes.c (realloc_string_callback): Handle case for which the RHS is an array expression. 2017-12

Re: [PATCH] PR 53796 Improve INQUIRE(RECL=...) handling

2017-11-27 Thread Thomas Koenig
Hi Janne, PING Looks good for trunk. Thanks! Since this is a change in user-visible behavior, will you also document this in gcc-8/changes.html ? If you prefer me to do this (haven't installed CVS or something :-) just drop me a line. Regards Thomas

Re: [patch, fortran] Implement maxloc and minloc for character

2017-11-23 Thread Thomas Koenig
Hi Janne, However, to continue my nitpicking (sorry!), it seems that in many cases compare_fcn still takes an integer length argument. Could you make that gfc_charlen_type as well? Or maybe size_t, since the argument is passed straight to memcmp{_char4} anyway? Please consider such a patch pre-a

Re: [PATCH] Make shift argument to eoshift0 be of type index_type

2017-11-22 Thread Thomas Koenig
Am 22.11.2017 um 21:06 schrieb Janne Blomqvist: Is that better? Ok for trunk? Yes, OK. Thanks a lot for the patch! Regards Thomas

Re: [PATCH] Use __BYTE_ORDER__ predefined macro instead of runtime check

2017-11-22 Thread Thomas Koenig
Hi janne, Regtested on x86_64-pc-linux-gnu, Ok for trunk? Jerry already OK'd this, so you can commit if you want. What you could do is to hide the macro invocation behind a macro in libgfortran.h, something like #define BIG_ENDIAN (__BYTE_ORDER__ == __ORDER_BIG_ENDIAN__) Also, I have opened

Re: [patch, fortran] Implement maxloc and minloc for character

2017-11-22 Thread Thomas Koenig
Hi Janne, So, attached is a new version of the patch. No update on the ChangeLog. OK for trunk? Yup, just really fix the copyright and string length stuff first. Thanks! Committed as rev 255070 with the fixes. There are still some files which mention Fortran 95, that can be fixed later. Tha

Re: [PATCH] Make shift argument to eoshift0 be of type index_type

2017-11-22 Thread Thomas Koenig
Hi Janne, Regtested on x86_64-pc-linux-gnu, Ok for trunk? libgfortran/ChangeLog: 2017-11-22 Janne Blomqvist * intrinsics/eoshift0.c (eoshift0): Make shift an index_type. Looks good in principle. Is it possible to come up with a test case? This might not be executable on all systems

Re: [patch, fortran] Implement maxloc and minloc for character

2017-11-21 Thread Thomas Koenig
Hi Janne, So, any other comments about my patch? OK for trunk? - In many cases the copyright notice has "This file is part of the GNU Fortran 95 runtime library (libgfortran)." It's a while since we've called ourselves "GNU Fortran 95", so just remove the "95". That's what I got for copying

Re: [patch, fortran] Implement maxloc and minloc for character

2017-11-20 Thread Thomas Koenig
Am 20.11.2017 um 09:30 schrieb Janne Blomqvist: On Sun, Nov 19, 2017 at 11:11 PM, Thomas Koenig wrote: There is one question regarding the ABI. Apparently, the string length is passed as an int even on a 64-bit system. I verified that this is indeed the case by doing the actual work on a

[patch, fortran] Implement maxloc and minloc for character

2017-11-19 Thread Thomas Koenig
for trunk? If so, I would tackle maxval next, in a similar fashion. If anybody has another resolution for the size_t vs. int issue - the nice thing about m4 is that it is fairly easy to make that change. Regards Thomas 2017-11-19 Thomas Koenig PR fortran/36313 * Makefil

Re: [PATCH] Make NEXTREC specifier for INQUIRE work for large record numbers

2017-11-18 Thread Thomas Koenig
We could consider setting up an automatic testing machine somewhere that not only does the usual test-suite, but also tests the unusual things like this. For example, I had a test case which died when launched with more than 32 threads for example. Not every machine or architecture could do that

Re: [PATCH] Make NEXTREC specifier for INQUIRE work for large record numbers

2017-11-18 Thread Thomas Koenig
Hi Janne, This is accomplished by making the NEXTREC specifier be a 8 byte integer where supported. I wasn't able to come up with a testcase that does not create a large file that could be added to the testsuite, but here's one which creates a 2 GB file: I think the patch is OK (even obvious),

Re: [PATCH] PR 44292 Enable large record lengths in OPEN and INQUIRE statements

2017-11-18 Thread Thomas Koenig
Hi Janne, This is a straightforward change that we can do now that the ABI has been bumped (again!). Regtested on x86_64-pc-linux-gnu, Ok for trunk? OK, and thanks. Regards Thomas

Re: [patch, fortran] Fix PR 83012, rejects-valid regression with contiguous pointer

2017-11-18 Thread Thomas Koenig
Steve, + for (r = expr->ref; r; r = r->next) + if (r->type == REF_COMPONENT) + rc = r; Should you have a break here? As I understand it, you're walking a list, so you could have r, r->next, r->next->next, and so on. Is it possible to have r->next->type = REF_CO

[patch, fortran] Fix PR 83012, rejects-valid regression with contiguous pointer

2017-11-17 Thread Thomas Koenig
Hello world, the attached patch fixes the PR by looking at the function interface if one exists. Regression-tested. OK for trunk? Regards Thomas 2017-11-17 Thomas Koenig PR fortran/83012 * expr.c (gfc_is_simply_contiguous): If a function call through a

[patch, doc] Document that new Perl version breaks required automake

2017-11-08 Thread Thomas Koenig
t;make pdf". OK for trunk? 2017-11-09 Thomas Koenig PR bootstrap/82856 doc/install.texi: Document incompatibility of Perl >=5.6.26 with the required version of automake 1.11.6. Index: doc/install.texi

[patch, libfortran, proof of concept] maxloc for character variables

2017-11-07 Thread Thomas Koenig
Hello world, attached is a very incomplete patch for implementing maxloc for character variables, which shows some detail of the implementation. The very simple test program program main character(len=3), dimension(3) :: a character(kind=4,len=1), dimension(2,2) :: b a(1) = '1' a(2) = '2

Re: [patch, fortran] Do loop (or index) interchange for FORALL and DO CONCURRENT, take 2

2017-11-05 Thread Thomas Koenig
Hi Steve, it is assumed + expensive, and that loops which access later indices (which access memory + in bigger strides) should be moved to the first loops. Looks good to me with the typo fix. Committed as r254430. Thanks for the review (and for catching the typo; my fingers appear to

[patch, fortran] Do loop (or index) interchange for FORALL and DO CONCURRENT, take 2

2017-11-05 Thread Thomas Koenig
Hello world, the attached patch now includes a new option to warn about a loop interchange, plus a test case using that option. Regression-tested. OK for trunk? Regards Thomas 2017-11-05 Thomas Koenig PR fortran/82471 * lang.opt (ffrontend-loop-interchange): New

Re: [Patch, fortran] PR81447 - [7/8] gfortran fails to recognize the exact dynamic type of a polymorphic entity that was allocated in a external procedure

2017-11-04 Thread Thomas Koenig
Hi Andre, Shouldn't that better be if ((gfc_option.allow_std & GFC_STD_F2003) > 0 I think that if ((gfc_option.allow_std & GFC_STD_F2003) would be better - the allow_std field is signed, and things could get hariy if we ever have close to 32 standards we would like to support. Hm, come

[test case, fortran, committed] Test case for PR 70330

2017-11-04 Thread Thomas Koenig
Hi, I have just committed the test case from PR 70330 to trunk and closed the (error-recovery) PR. Regards Thomas https://gcc.gnu.org/viewcvs?rev=254406&root=gcc&view=rev

Re: [patch, fortran] Index interchange for FORALL and DO CONCURRENT

2017-11-03 Thread Thomas Koenig
Am 31.10.2017 um 21:56 schrieb Bernhard Reutner-Fischer: On Tue, Oct 31, 2017 at 09:50:37PM +0100, Bernhard Reutner-Fischer wrote: On Tue, Oct 31, 2017 at 09:30:27PM +0100, Thomas Koenig wrote: Or maybe emit diagnostics into the frontend optimize dump file and scan that? If we could check

Ping: [patch, fortran] KIND arguments for MINLOC and MAXLOC

2017-11-03 Thread Thomas Koenig
Am 28.10.2017 um 23:57 schrieb Thomas Koenig: Ping? the attached patch allows KIND arguments to MINLOC and MAXLOC. There was a bit of a choice to make here. Originally, I wanted to run the calculation using index_type only and convert to another integer kind if that was required. This ran into

Re: [patch, fortran] Index interchange for FORALL and DO CONCURRENT

2017-10-31 Thread Thomas Koenig
Hi Bernhard, Regression-tested. OK for trunk? s/shoud/should/; s/acessed/accessed/; s/indces/indices/; Fixed. why are struct ind_type "n" and "num" int and not unsigned int? I tend not to use signed variables unless the special overflow semantics are required. I like Fortran, which does

[patch, fortran] Index interchange for FORALL and DO CONCURRENT

2017-10-31 Thread Thomas Koenig
could test the nesting of loops. Regression-tested. OK for trunk? Regards Thomas 2017-10-31 Thomas Koenig * lang.opt (ffrontend-loop-interchange): New option. * options.c (gfc_post_options): Handle it. * frontend-passes.c (gfc_run_passes): Run

Re: [PATCH] fix AIX fortran builds

2017-10-30 Thread Thomas Koenig
Hi Jim, If I add a call to gcc_unreachable after the longjmp call, then it builds on both linux and AIX.  Anyone have a better idea on how to fix this?  If I don't get any responses in a few days, I will check it in under the obvious rule, since it fixes a build failure. The patch is OK. Than

Re: [patch, fortran, RFC] Interchange indices for FORALL and DO CONCURRENT if profitable

2017-10-29 Thread Thomas Koenig
Am 28.10.2017 um 00:03 schrieb Thomas Koenig: +typepedef struct { That should have been typdef, obviously - the typo must have slipped in after testing. Regards Thomas

[patch, fortran] KIND arguments for MINLOC and MAXLOC

2017-10-28 Thread Thomas Koenig
use kind=1 and kind=2 are not supported at the moment. This bug would be fixed together with 82660. Regression-tested. OK for trunk? Regards Thomas 2017-10-28 Thomas Koenig PR fortran/29600 * gfortran.h (gfc_check_f): Replace fm3l with fm4l. * i

Re: [patch, fortran, RFC] Interchange indices for FORALL and DO CONCURRENT if profitable

2017-10-28 Thread Thomas Koenig
Hi Steve, On Sat, Oct 28, 2017 at 12:03:58AM +0200, Thomas Koenig wrote: +/* Callback function to determine if an expression is the + corresponding variable. */ + +static int static bool Most of the functions in the patch are callback functions for gfc_code_walker or gfc_expr_walker

[patch, fortran, RFC] Interchange indices for FORALL and DO CONCURRENT if profitable

2017-10-27 Thread Thomas Koenig
x27;t think so) or to make Graphite catch this sort of pattern (which it currently doesn't) instead? Regards Thomas 2017-10-27 Thomas Koenig * frontend-passes.c (index_interchange): New funciton, prototype. (optimize_namespace): Call index_interchange.

[patch, fortran] Fix PR 56342, matmul was not simplified

2017-10-22 Thread Thomas Koenig
cases. Regression-tested. OK for trunk? Regards Thomas 2017-10-22 Thomas Koenig PR fortran/56342 * simplify.c (is_constant_array_expr): If the expression is a parameter array, call gfc_simplify_expr. 2017-10-22 Thomas Koenig PR fortran/

Re: [patch, fortran] Fix PR 82567

2017-10-18 Thread Thomas Koenig
Hi Jerry and Steve, Well I know 42 is the answer to the ultimate question of the universe so this must be OK. I just don't know what the question is. OK and thanks, Jerry +#define CONSTR_LEN_MAX 42 Actually, I was wondering about the choice myself. With most common hardware having fairly r

[patch, fortran] Fix PR 82567

2017-10-17 Thread Thomas Koenig
other affected branches? Regards Thomas 2917-10-17 Thomas Koenig PR fortran/82567 * frontend-passes.c (combine_array_constructor): If an array constructor is all constants and has more elements than a small constant, don't convert a*[b,c] to [a*b,a*

[patch, fortran] Fix PR 79795

2017-10-15 Thread Thomas Koenig
Hello world, the attached patch fixes a regression by turning an ICE-on-invalid into an error message (and making sure that it fits). Regression-tested on trunk. OK for all affected branches (8/7/6)? Regards Thomas 2017-10-15 Thomas Koenig PR fortran/79795

Re: [patch, fortran] New take on PR 82373

2017-10-15 Thread Thomas Koenig
Hi Steve, I like this patch much better than the last. It's ok with me, but you might want give 24 hours to let the world rotate before committing (ie., allow others to comment) Committed as r253768. Thanks for the review! I don't think it is worth backporting, so I'll close the bug. If som

[patch, fortran] New take on PR 82373

2017-10-12 Thread Thomas Koenig
. OK for trunk? Regards Thomas 2017-10-12 Thomas Koenig PR fortran/82372 * fortran/scanner.c (last_error_char): New global variable. (gfc_scanner_init_1): Set last_error_char to NULL. (gfc_gooble_whitespace): If a character not printable or not

Re: [patch, Fortran] Fix PR 82372

2017-10-10 Thread Thomas Koenig
Hi Steve, the attached patch displays an error for characters which are outside the normal Fortran character set, and includes a hex If this ^ corresponds to this statement, +char valid_chars[] = + "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"

[patch, Fortran] Fix PR 82372

2017-10-10 Thread Thomas Koenig
-tested. OK for trunk? What do people feel about backporting? Regards Thomas 2017-10-10 Thomas Koenig PR fortran/82372 * fortran/scanner.c (valid_chars): String with all characters which could be valid in Fortran. (valid_table): Boolean table to select

[patch, libfortran] Fix EXECUTE_COMMAND_LINE error return

2017-10-09 Thread Thomas Koenig
ected branches? Regards Thomas 2017-10-10 Thomas Koenig PR libfortran/82233 * intrinsics/execute_command_line.c (execute_command_line): No call to runtime_error if cmdstat is present. 2017-10-10 Thomas Koenig PR libfortran/82233 * gfortr

Re: [patch, fortran, committed] Small -fdump-fortran-original fixes, plus documentation update

2017-10-08 Thread Thomas Koenig
Hi Paul, I thought that the suggestion to add the original input lines was not bad. It would be even better if -fdump-tree-original could do that. I often time find myself putting a line under the spotlight in a contained subroutine. This should be doable. What should be the perferred format

[patch, fortran, committed] Small -fdump-fortran-original fixes, plus documentation update

2017-10-08 Thread Thomas Koenig
releases. Regards Thomas 2017-10-08 Thomas Koenig * dump_prase_tree (show_symbol): Output list of variables in NAMELIST. (show_code_node): Add new line for ELSE and END DO for DO CONCURRENT. * invoke.texi: Document that the output of -fdump

[patch, wwwdocs, committed]

2017-10-06 Thread Thomas Koenig
Hi, I just committed the change below. Gerald's bot had no complaints, so I guess this must be OK :-) 75a76,78 > The main version of libfortran has been changed to 5. > > 87a91,95 > > When an actual argument contains too few errors for a dummy argument, > an error is now i

[patch, fortran] Set implicit ASYNCHRONOUS attribute

2017-10-04 Thread Thomas Koenig
for trunk? Regards Thomas 2017-10-04 Thomas Koenig * gfortran.h (async_io_dt): Add external reference. * io.c (async_io_dt): Add variable. (compare_to_allowed_values): Add prototyte. Add optional argument num. If present, set it to the number of the entr

[patch, fortran] Error for non-contiguous pointers

2017-10-03 Thread Thomas Koenig
. Regression-tested. OK for trunk? Thomas 2017-10-03 Thomas Koenig PR fortran/49232 * expr.c (gfc_check_pointer_assign): Error for non-contiguous rhs. 2017-10-03 Thomas Koenig PR fortran/49232 * gfortran.dg/contiguous_4.f90: New test. Index

[patch, fortran, committed] Handle EXEC_WAIT in Fortran tree dump

2017-10-03 Thread Thomas Koenig
WAIT actually does anything :-) Regards Thomas 2017-10-03 Thomas Koenig * io.c (match_wait_element): Correctly match END and EOR tags. * dump-parse-tree.c (show_code_node): Handle EXEC_WAIT. Index:

Re: [patch, libfortran] Fix thead sanitizer issue with libgfortran

2017-10-01 Thread Thomas Koenig
Hi Bernd, I believe that all omp threads are created in detached state, so pthread_join should be undefined on them, just tsan*thinks* otherwise? When I look further on the libgomp sources, I see there are two completely different implementations of the mutexes, barriers, etc. One using posix

Re: [Patch, fortran] PR 82312 - [7/8 Regression] Pointer assignment to component of class variable results wrong vptr for the variable

2017-10-01 Thread Thomas Koenig
Hi Paul, Bootstraps and regtests on FC23/x86_64 - OK for trunk and 7 branch? OK for both. Thanks for the patch! Regards Thomas

Re: [patch, libfortran] Fix thead sanitizer issue with libgfortran

2017-10-01 Thread Thomas Koenig
with gfortran? Regards Thomas 2017-10-01 Thomas Koenig PR fortran/66756 PR fortran/82378 * io/io.h: Add field th to gfc_unit. Add prototypes for lock_unit and trylock_unit. * io/unit.c (insert_unit): Do not create lock and lock, move

Re: [Patch, fortran] PR77296 - [F03] Compiler Error with allocatable string and associate

2017-10-01 Thread Thomas Koenig
Hi Paul, The attached patch fixes the PR and most of the remaining, if not all, problems associated with deferred string length targets in the associate construct. Bootstraps and regtests on FC23/x86_64 - OK for trunk? Yes. Thanks a lot for working on this! Regards Thomas

Re: [PATCH gfortran v2] PR 61450: ICE in gfc_global_used()

2017-10-01 Thread Thomas Koenig
Hi Dominique, The patch is OK for trunk. Thanks! Thomas

Re: [patch, libfortran] Fix thead sanitizer issue with libgfortran

2017-09-29 Thread Thomas Koenig
Am 29.09.2017 um 10:03 schrieb Janne Blomqvist: 1) I'm confused why fbuf_destroy is modified. The fbuf structure is part of gfc_unit, and should be accessed with the same locking rules as the rest of the gfc_unit components. When closing the unit, I think the same should apply here, no? It is

Re: [patch, libfortran] Fix thead sanitizer issue with libgfortran

2017-09-28 Thread Thomas Koenig
(with a test case) with the current version. Also regression-tested. So, > Comments? Suggestions for improvements/other approaches? Close the PR > as WONTFIX instead? OK for trunk? Regards Thomas 2017-09-29 Thomas Koenig PR fortran/66756 * io/fbuf.c (fbuf_d

[patch, libfortran] Fix thead sanitizer issue with libgfortran

2017-09-28 Thread Thomas Koenig
this approach (and my code) is correct. Regression-tested. Comments? Suggestions for improvements/other approaches? Close the PR as WONTFIX instead? OK for trunk? Regards Thomas 2017-09-28 Thomas Koenig PR fortran/66756 * io/fbuf.c (fbuf_destroy): Lock unit before

[patch, fortran, committed] Fix wrong warning inside associate construct

2017-09-26 Thread Thomas Koenig
Thomas Koenig * frontend-passes.c (do_subscript): Don't do anything if inside an associate list. 2017-09-26 Thomas Koenig * gfortran.dg/gomp/associate1.f90: Remove unnecessary warning from associate construct and do loop.

Re: [patch, fortran] Warn about out-of-bounds access with DO subscripts

2017-09-26 Thread Thomas Koenig
Hi Jakub, associate(k => v, l => a(i, j), m => a(i, :)) And I don't really see a bug in the testcase... Hm, I will look at this. Maybe some strange interaction with associate here... Regards Thomas

Re: [patch, fortran] Warn about out-of-bounds access with DO subscripts

2017-09-26 Thread Thomas Koenig
Hi! On Mon, 25 Sep 2017 18:50:49 +0200, Thomas Koenig wrote: Thanks for the review, committed as r253156. Now, on to some other bugs... No, back to this one please. ;-) OK, if you insist :-) Apparently, the changes you prepared for existing testcases did not get committed, so I'

Re: [patch, fortran] Warn about out-of-bounds access with DO subscripts

2017-09-25 Thread Thomas Koenig
Hi Jerry, Yes OK, Thanks for the review, committed as r253156. Now, on to some other bugs... Regards Thomas

[fortran, test case, committed]

2017-09-24 Thread Thomas Koenig
Hello world, this seems to be a productive day for gfortran :-) Here is another commit of a test case for a bug that was fixed some time ago. This is r253126. Regards Thomas 2017-09-24 Thomas Koenig PR fortran/66328 * gfortran.dg/data_derived_1.f90: New test

[test cases, fortran, committed] Test cases for PR 54633

2017-09-24 Thread Thomas Koenig
stion in the PR). Regards Thomas 2017-09-24 Thomas Koenig PR fortran/54633 * gfortran.dg/intrinsic_bounds_1.f90: New test. * gfortran.dg/intrinsic_param_1.f90: New test.

[patch, fortran, committed] Fix PR 80118

2017-09-24 Thread Thomas Koenig
Hello world, Steve had analyzed the bug and provided a patch in the PR; I modified the patch stylistically and committed it as obvious after regression-testing (r253123). Thanks Steve! Since this is a regression, I will backport soon. Regards Thomas 2017-09-24 Thomas Koenig

[patch, fortran] Warn about out-of-bounds access with DO subscripts

2017-09-23 Thread Thomas Koenig
? Regards Thomas 2017-09-23 Thomas Koenig * lang.opt: Add -Wdo-subscript. * frontend-passes.c (do_t): New type. (doloop_list): Use variable of do_type. (if_level): Variable to track if levels. (select_level): Variable to track select levels

Re: [Patch, Fortran] PR 82018: -Wextra should imply -Wconversion-extra

2017-09-19 Thread Thomas Koenig
Am 18.09.2017 um 11:50 schrieb Dominique d'Humières: Warning: Conversion from 'REAL(4)' to 'REAL(8)' at (1) [-Wconversion-extra] Not me (not in the general case) even if may allow to detect things such as ‘pi8=acos(-1.0)’? This one would be interesting to catch (even with -Wall), although i

[patch, fortran] Warn about out-of-bounds-errors in DO loops

2017-09-17 Thread Thomas Koenig
=1,10 (some jump statement, which could jump out of the loop) A(I) = 21. END DO Regression-testing found some erroneous code in the testsuite, also corrected. OK for trunk? I will update the documentation separately. Regards Thomas 2017-09-17 Thomas Koenig * lang.opt

Re: [Patch, Fortran] PR 82018: -Wextra should imply -Wconversion-extra

2017-09-17 Thread Thomas Koenig
Hi Janus, here is a small patch that enables -Wconversion-extra with -Wextra and updates the documentation. I grepped for warn_conversion_extra and found 14 occurrences in the gfortran source tree. Are we sure we want to enable each of these warnings with -Wextra? Regards Thomas

Re: [patch, fortran, RFC] warn about out-of-bounds errors in DO loops

2017-09-14 Thread Thomas Koenig
Hi Richard, Is it OK to throw a hard error for this? Maybe the rules are different from C and C++, but normally we can't do that for code that's only invalid if executed. An unconditional warning would be good though. I can also issue an unconditional warning; this will even simplify the cod

<    4   5   6   7   8   9   10   11   12   13   >