Re: [PATCH] fortran: Factor array descriptor references

2025-07-15 Thread Steve Kargl
On Sun, Jul 13, 2025 at 10:59:32AM +0200, Mikael Morin wrote: > > Regression tested on x86_64-pc-linux-gnu. > OK for master? > Yes, with one observation below. > diff --git a/gcc/fortran/trans-array.cc b/gcc/fortran/trans-array.cc > index 1561936daf1..af62e17442b 100644 > --- a/gcc/fortran/tran

Re: [Fortran, Patch, PR120711, v1] 1/(3) Fix out of bounds access in cleanup of array constructor

2025-07-09 Thread Steve Kargl
On Wed, Jul 09, 2025 at 08:50:08AM +0200, Andre Vehreschild wrote: > > why shall the testcase be invalid? See the 2nd bullet in Fortran 2023, 9.7.1.3 Allocation of allocatable variables. An allocatable variable has a status of "unallocated" if it is not allocated. ... An allocata

Re: [PATCH, v2] Fortran: fix minor issues with coarrays (extended)

2025-07-07 Thread Steve Kargl
On Mon, Jul 07, 2025 at 08:53:16PM +0200, Harald Anlauf wrote: > Andre, > > I still don't get it, and the present version made it worse for me... > > So let's see what I was thinking. There are the following types of > functions: > > (0) impure, non-elemental functions, which likely have side-e

Re: [PATCH] libgfortran: add fallback for trigonometric pi-based functions

2025-07-07 Thread Steve Kargl
On Sun, Jul 06, 2025 at 09:09:53PM +0800, Yuao Ma wrote: > Hi Tobias, > > On 7/6/2025 6:34 PM, Tobias Burnus wrote: > > As that commit is from 2020 and 2.69 in from 2012, it seems as if your > > autoconf is too new. Can you re-check that the right version is at the > > beginning of the PATH? > >

Re: [PATCH] libgfortran: add fallback for trigonometric pi-based functions

2025-07-05 Thread Steve Kargl
On Sun, Jul 06, 2025 at 08:43:06AM +0800, Yuao Ma wrote: > Hi Steve, > > On 7/6/2025 12:25 AM, Steve Kargl wrote: > > On Sat, Jul 05, 2025 at 05:20:02PM +0800, Yuao Ma wrote: > > > diff --git a/libgfortran/configure b/libgfortran/configure > > > index 9898a94a37

Re: [Patch, fortran] PR106135 - Implement F2018 IMPORT statements

2025-07-05 Thread Steve Kargl
Paul, Either resolve.cc has sufficiently evolved since you submitted your patch or the patch is somehow mangled. When I apply it to my tree for resolve.cc, I see Hunk #1 succeeded at 3919. Hunk #2 succeeded at 4223. Hunk #3 succeeded at 7940 (offset -28 lines). Hunk #4 succeeded at 8068 (offset

Re: [PATCH] libgfortran: add fallback for trigonometric pi-based functions

2025-07-05 Thread Steve Kargl
On Sat, Jul 05, 2025 at 05:20:02PM +0800, Yuao Ma wrote: > > diff --git a/libgfortran/configure b/libgfortran/configure > index 9898a94a372..971f1e9df5e 100755 > --- a/libgfortran/configure > +++ b/libgfortran/configure > @@ -16413,7 +16413,7 @@ else > We can't simply define LARGE_OFF_T to b

Re: [PATCH] fortran: Add the preliminary code of MOVE_ALLOC arguments

2025-07-03 Thread Steve Kargl
On Thu, Jul 03, 2025 at 10:12:52PM +0200, Mikael Morin wrote: > From: Mikael Morin > > Regression-tested on aarch64-unknown-linux-gnu. > OK for master? > Yes. Almost looks obvious once someone finds and fixes the issue. Thanks for the patch. -- Steve

Re: [PATCH] libquadmath: add quad support for trig-pi functions

2025-07-03 Thread Steve Kargl
On Thu, Jul 03, 2025 at 02:43:43PM +0200, Michael Matz wrote: > Hello, > > On Thu, 3 Jul 2025, Yuao Ma wrote: > > > This patch adds the required function for Fortran trigonometric functions to > > work with glibc versions prior to 2.26. It's based on glibc source commit > > 632d895f3e5d98162f77b9

Re: [PATCH] libquadmath: add quad support for trig-pi functions

2025-07-02 Thread Steve Kargl
On Thu, Jul 03, 2025 at 12:56:24AM +0800, Yuao Ma wrote: > > This patch adds the required function for Fortran trigonometric functions to > work with glibc versions prior to 2.26. It's based on glibc source commit > 632d895f3e5d98162f77b9c3c1da4ec19968b671. > > I've built it successfully on my en

Re: [Fortran, Patch, PR120843, v3] Fix reject valid, because of inconformable coranks

2025-07-02 Thread Steve Kargl
On Wed, Jul 02, 2025 at 04:36:38AM -0700, Damian Rouson wrote: > git branch > gir checkout > git add > git commit > git rebase > git push > > It’s time to move beyond emailing patches! (Please.) I don't use git other than 'git clone', 'git reset --hard', and 'git diff'. If gfortran development

Re: [Patch, Fortran, Coarray, PR88076, v1] 0/6 Add a shared memory multi process coarray library.

2025-06-30 Thread Steve Kargl
Andre, I've never built gcc for aarch64-freebsd. I was going to suggest doing the full bootstrap, but that seems to be too slow. On amd64, I use ../gcc/configure --prefix=$WDIR \ --enable-languages=c,c++,fortran,lto \ --enable-bootstrap \ --disable-nls \ --disable-libssp \ --disa

Re: [Patch, Fortran, Coarray, PR88076, v1] 0/6 Add a shared memory multi process coarray library.

2025-06-29 Thread Steve Kargl
On Sun, Jun 29, 2025 at 06:54:53PM -0700, Steve Kargl wrote: > On Sun, Jun 29, 2025 at 03:30:21PM -0700, Steve Kargl wrote: > > On Sun, Jun 29, 2025 at 11:07:31AM -0700, Steve Kargl wrote: > > > On Sun, Jun 29, 2025 at 10:35:39AM -0700,

Re: [Patch, Fortran, Coarray, PR88076, v1] 0/6 Add a shared memory multi process coarray library.

2025-06-29 Thread Steve Kargl
Yet, another head scratcher. ../../../gcc/libgfortran/caf/shmem/supervisor.c:235:27: error: 'environ' undeclared (first use in this function) 235 | for (char **e = environ; *e; ++e, ++n) | ^~~ I see 'extern char **environ;' in shmem.c. Is this sup

Re: [Patch, Fortran, Coarray, PR88076, v1] 0/6 Add a shared memory multi process coarray library.

2025-06-29 Thread Steve Kargl
On Sun, Jun 29, 2025 at 07:06:57PM -0700, Steve Kargl wrote: > On Sun, Jun 29, 2025 at 06:54:53PM -0700, Steve Kargl wrote: > > > > /usr/local/bin/ld: cannot find -lcaf_shmem: No such file or directory > > collect2: error: ld returned 1 exit status > > compiler exited

Re: [Patch, Fortran, Coarray, PR88076, v1] 0/6 Add a shared memory multi process coarray library.

2025-06-29 Thread Steve Kargl
On Sun, Jun 29, 2025 at 06:54:53PM -0700, Steve Kargl wrote: > > /usr/local/bin/ld: cannot find -lcaf_shmem: No such file or directory > collect2: error: ld returned 1 exit status > compiler exited with status 1 > > The freshly built gfortran cannot find the libcaf_shmem.a.

Re: [Patch, Fortran, Coarray, PR88076, v1] 0/6 Add a shared memory multi process coarray library.

2025-06-29 Thread Steve Kargl
On Sun, Jun 29, 2025 at 03:30:21PM -0700, Steve Kargl wrote: > On Sun, Jun 29, 2025 at 11:07:31AM -0700, Steve Kargl wrote: > > On Sun, Jun 29, 2025 at 10:35:39AM -0700, Steve Kargl wrote: > > > > > > === gfortran Summary === > > > > &g

Re: [Patch, Fortran, Coarray, PR88076, v1] 0/6 Add a shared memory multi process coarray library.

2025-06-29 Thread Steve Kargl
On Sun, Jun 29, 2025 at 11:07:31AM -0700, Steve Kargl wrote: > On Sun, Jun 29, 2025 at 10:35:39AM -0700, Steve Kargl wrote: > > > > === gfortran Summary === > > > > # of expected passes73149 > > # of unexpected failures522 I

Re: [Patch, Fortran, Coarray, PR88076, v1] 0/6 Add a shared memory multi process coarray library.

2025-06-29 Thread Steve Kargl
On Sun, Jun 29, 2025 at 08:36:38PM +0200, Andre Vehreschild wrote: > > I would do git am pr88076_v1_1.patch or patch -p1 each of the patch files. Then they go where they ought to be. Thanks. I needed -p1 for v1_5 and v1_6. > Pro tip: create a new branch before doing the git am, then you can ju

Re: [Patch, Fortran, Coarray, PR88076, v1] 0/6 Add a shared memory multi process coarray library.

2025-06-29 Thread Steve Kargl
On Sun, Jun 29, 2025 at 10:35:39AM -0700, Steve Kargl wrote: > > Just applied the 6 patch (with the update part 5). I'm > seeing a significant increase in the number of failures > in 'make check-fortran' testing. > Just re-applied your patches in the top-level g

Re: [Patch, Fortran, Coarray, PR88076, v1] 0/6 Add a shared memory multi process coarray library.

2025-06-29 Thread Steve Kargl
On Sun, Jun 29, 2025 at 10:35:39AM -0700, Steve Kargl wrote: > > === gfortran Summary === > > # of expected passes73149 > # of unexpected failures522 > # of expected failures 343 > # of unresolved testcases 78 >

Re: [Patch, Fortran, Coarray, PR88076, v1] 0/6 Add a shared memory multi process coarray library.

2025-06-29 Thread Steve Kargl
On Thu, Jun 26, 2025 at 10:15:01AM +0200, Andre Vehreschild wrote: > > I deem this library fit for educational and research use, > where small to medium sized problems are researched. I do > not expect it to support a long term running application, > because is does not join adjacent blocks in th

Re: [Patch, Fortran, Coarray, PR88076, v1] 0/6 Add a shared memory multi process coarray library.

2025-06-29 Thread Steve Kargl
On Tue, Jun 24, 2025 at 03:09:33PM +0200, Andre Vehreschild wrote: > > this series of patches (six in total) adds a new coarray backend library to > libgfortran. The library uses shared memory and processes to implement > running multiple images on the same node. The work is based on work starte

Re: [PATCH 16/17] Fortran: Silence a clang warning (suggesting a brace) in io.cc

2025-06-25 Thread Steve Kargl
Thanks for cleaning up gfortran code. I was curious about what the GNU Coding Standard said about this case, but it does not consider initialization of subobjects. I did find 5.3 Clean Use of C Constructs ... Don't make the program ugly just to placate static analysis tools such as l

Re: [PATCH 07/17] gfortran: Avoid freeing uninitialized value

2025-06-25 Thread Steve Kargl
On Wed, Jun 25, 2025 at 04:09:26PM +0200, Martin Jambor wrote: > Hi, > > When compiling fortran/match.cc, clang emits a warning > > fortran/match.cc:5301:7: warning: variable 'p' is used uninitialized > whenever 'if' condition is true [-Wsometimes-uninitialized] > > which looks accurate, so t

Re: [Patch, Fortran, Coarray, PR88076, v1] 6/6 Add a shared memory multi process coarray library.

2025-06-25 Thread Steve Kargl
test. There will be bugs, because nobody is perfect. > > @Steve caf_shmem does not use MPI. It is a shared memory, single node, multi > process approach. Just to prevent any misunderstanding. > > Thanks for all the testing. > > Regards, > Andre > > On Tue, 24

Re: [PATCH] Fortran: fix ICE in verify_gimple_in_seq with substrings [PR120743]

2025-06-24 Thread Steve Kargl
On Tue, Jun 24, 2025 at 09:00:46PM +0200, Harald Anlauf wrote: > > here's an obvious fix for a recent regression: substring offset > calculations used a wrong type that crashed in gimplification. > Andre basically OK'ed it in the PR, but here it is nevertheless. > > Regtested on x86_64-pc-linux-g

Re: [Patch, Fortran, Coarray, PR88076, v1] 6/6 Add a shared memory multi process coarray library.

2025-06-24 Thread Steve Kargl
Damian, I submitted a patch a long time ago to make -fcoarray=single the default behavior. The patch made -fcoarray=none a NOP. With inclusion of a shmem implementation of the runtime parts, this might be the way to go. I'll leave that decision to Andre, Thomas, and Nicolas. I believe that the

Re: [PATCH, part1, v2] Fortran: various fixes for STAT/LSTAT/FSTAT intrinsics [PR82480]

2025-06-17 Thread Steve Kargl
On Tue, Jun 17, 2025 at 12:05:34PM +0300, Janne Blomqvist wrote: > On Mon, Jun 16, 2025 at 9:41 PM Harald Anlauf wrote: > > > > Am 16.06.25 um 02:18 schrieb Steve Kargl: > > > Harald, > > > > > > I did a quick glance at the patch and did not see anything

Re: [PATCH, part1, v2] Fortran: various fixes for STAT/LSTAT/FSTAT intrinsics [PR82480]

2025-06-15 Thread Steve Kargl
would overflow assignment to integer(kind=4), and does not > return ERANGE as in v1 of this patch. There is no need to modify > the existing testcasese stat_{1,2}.f90. > > Cheers, > Harald > > Am 12.06.25 um 22:12 schrieb Harald Anlauf: > > Hi Steve, > > > > On 6

Re: [PATCH, part1] Fortran: various fixes for STAT/LSTAT/FSTAT intrinsics [PR82480]

2025-06-11 Thread Steve Kargl
On Wed, Jun 11, 2025 at 10:18:37PM +0200, Harald Anlauf wrote: > > the attached patch is a first attempt to fix some issues with the GNU > intrinsics STAT/LSTAT/FSTAT which are g77 heritage. This patch is > preparatory for dealing with the issue reported in PR82480 in that > the default version o

Re: [PATCH] libfortran: Regenerate files

2025-06-06 Thread Steve Kargl
On Fri, Jun 06, 2025 at 02:34:09PM +0200, FX Coudert wrote: > > In commit 5e918a4db9e4a5bdbeafec6881fa8b22a55d3789, regenerated files > were not included in the commit as they should have been. Therefore, a > whitespace fix was not propagated. Sync generated files now, as obtained > from a run wit

Re: [PATCH] Fortran: parameter inquiries of constant complex arrays [PR102599,PR114022]

2025-05-30 Thread Steve Kargl
On Fri, May 30, 2025 at 07:37:49PM +0200, Harald Anlauf wrote: > > here's a patch fixing the handling of parameter inquiries of > constant complex arrays. It profits from previous fixes for > inquiries of substrings and essentially adds only the simplification > of %re/%im applies to complex arra

Re: [PATCH, Fortran] Bug 119856 - Missing commas in I/O formats not diagnosed by default at compile time.

2025-05-28 Thread Steve Kargl
On Wed, May 28, 2025 at 08:11:05AM -0700, Jerry D wrote: > The attached patch is simple and self explanatory in the git log entry. > > Regression tested on X86_64-linux-gnu. > > OK for trunk? > Yes, with one question. > commit 845768cbead03f76265e491bcf5ea6de7020ff39 > Author: Jerry DeLisle >

Re: [PATCH] fortran: add constant input support for trig functions with half-revolutions

2025-05-27 Thread Steve Kargl
On Tue, May 27, 2025 at 02:17:46PM +, Yuao Ma wrote: > > I've reverted the recent format changes, as three reviewers indicated they > caused more harm than good. > Thank you. > Are there any functional problems I need to address? I did not see any additional functional issues. Patch is OK

Re: [PATCH] fortran: add constant input support for trig functions with half-revolutions

2025-05-26 Thread Steve Kargl
On Mon, May 26, 2025 at 09:30:59AM +, Yuao Ma wrote: > Hi Steve, > > > I looked at the patch in a bit more detail, and > > I am not thrilled with large-scale whitespace > > changes mingled with functional changes. It makes > > the patch harder to read and review. > > I'm not sure which file y

Re: [PATCH] fortran: add constant input support for trig functions with half-revolutions

2025-05-25 Thread Steve Kargl
On Sun, May 25, 2025 at 04:56:48AM +, Yuao Ma wrote: > > Thanks for your review! I've updated the patch. > > > this range_check() is unneeded. > > Done. > > > As a side note, the error message is slightly misleading > > (although it will not be issued). Technically, x = -1 or 1 > > are all

Re: [PATCH] fortran: add constant input support for trig functions with half-revolutions

2025-05-23 Thread Steve Kargl
Apologies for late a late reply. A quick skim of the code suggests that you can eliminate some of the range_check() calls in the simplifications. For example, you have +gfc_expr * +gfc_simplify_acospi (gfc_expr *x) +{ + gfc_expr *result; + + if (x->expr_type != EXPR_CONSTANT) +return NULL;

Re: [patch, fortram] Bug 120049 - ICE when using IS_C_ASSOCIATED ()

2025-05-06 Thread Steve Kargl
On Tue, May 06, 2025 at 07:43:41PM +0200, Harald Anlauf wrote: > > the new logic misses the following bad code: > > print *, c_associated(c_loc(val), 42) > > This now ICEs here. > > I suggest to not 'return true' too early before all arguments > have been checked. > Good catch, Harald. We

Re: [patch, fortram] Bug 120049 - ICE when using IS_C_ASSOCIATED ()

2025-05-06 Thread Steve Kargl
On Mon, May 05, 2025 at 08:30:09PM -0700, Jerry D wrote: > Attached patch fixes this by checking for BT_VOID and EXPR_FUNCTION. > > Thank you for guidance from Steve in the PR and Vincent for > identifying the problem. > > Two test case files added to the testsuite. > > Regression tested on x86_

Re: [Patch, Fortran] C prototypes for functions returning C function pointers

2025-04-05 Thread Steve Kargl
On Mon, Mar 24, 2025 at 09:40:38PM +0100, Thomas Koenig wrote: > > Regression-tested. Again no test case because I don't know > how. During testing, I also found that vtabs were dumped, > this is also corrected. > > OK for trunk? Thanks for working on this, but ... > > /* This section deals

Re: [PATCH] Fortran: fix bogus bounds check for reallocation on assignment [PR116706]

2025-03-19 Thread Steve Kargl
On Wed, Mar 19, 2025 at 11:08:58PM +0100, Harald Anlauf wrote: > > the attached patch addresses an actually very long-standing issue > with bogus bounds checks for components of nested derived types in > assignments when an intermediate level has the POINTER attribute > instead of the ALLOCATABLE

Re: [PATCH] Fortran: improve checking of substring bounds [PR119118]

2025-03-11 Thread Steve Kargl
On Thu, Mar 06, 2025 at 10:49:08PM +0100, Harald Anlauf wrote: > > Thanks for the speedy review! > It was a bit easier than normal. After I submitted the PR, I started to poke around in fortran/resolve.cc to see if I could deal with the issue. I saw that you grab the PR last night, and left yo

Re: [patch, Fortran] Fix PR 119157, regression with -Wexternal-argument-mismatch

2025-03-08 Thread Steve Kargl
On Sat, Mar 08, 2025 at 01:52:06PM +0100, Thomas Koenig wrote: > > the attached patch fixes an ICE regresseion where undo state was not > handled properly when generating formal from actual arguments, which > occurred under certain conditions with the newly introduced > -Wexternal-argument-mismatc

Re: [PATCH] Fortran: improve checking of substring bounds [PR119118]

2025-03-07 Thread Steve Kargl
On Thu, Mar 06, 2025 at 10:04:08PM +0100, Harald Anlauf wrote: > > this patch fixes an interesting regression that prevented substring > bounds checks from being generated if the substring start was not a > variable, but rather a constant or an expression. > > The fix I chose turned out to be a l

Re: [Ping, Patch, www-docs, Fortran, Coarray-ABI] Announce coarray-ABI changes in gfortran-15

2025-03-06 Thread Steve Kargl
Andre, Here's a bit of wordsmith. I removed the abbreviation "Esp." I'm not sure if there is additional markup needed; especially, with the "-fcoarray=single" I inserted. Coarray support has been reworked to allow access to components in derived types that have not been compiled with coarray

Re: [Fortran, Patch, PR77872, v1] Fix ICE when getting caf-token from abstract class type.

2025-03-03 Thread Steve Kargl
On Mon, Mar 03, 2025 at 03:58:24PM +0100, Andre Vehreschild wrote: > > attached patches fix a 12-regression, when a caf token is requested from an > abstract class-typed dummy. The token was not looked up in the correct spot. > Due the class typed object getting an artificial variable for direct d

Re: [PATCH] Fortran: fix front-end memleak after failure during parsing of NULLIFY

2025-03-01 Thread Steve Kargl
On Sat, Mar 01, 2025 at 03:56:21PM +0100, Harald Anlauf wrote: > > the attached patch fixes a front-end memleak that is seen when > running f951 under valgrind and while parsing invalid uses of > NULLIFY. > > I had this in my tree for some time without any problems, in an > attempt to further red

Re: [patch, Fortran] Fix PR 118862, overwide shft

2025-02-16 Thread Steve Kargl
On Sun, Feb 16, 2025 at 09:36:20AM +0100, Thomas Koenig wrote: > > this patch is a variation of Jakub's patch in the PR, which > avoids overflow on the mask used for exponentiation and > fixes unsigned HOST_WIDE_INT. I tried testing this on > a POWER machine, but --with-build-config=bootstrap-ubs

Re: [PATCH] Fortran: fix initialization of allocatable non-deferred character [PR59252]

2025-02-07 Thread Steve Kargl
On Fri, Feb 07, 2025 at 09:31:12PM +0100, Harald Anlauf wrote: > > Regtested on x86_64-pc-linux-gnu. OK for mainline? > Looks reasonable. > While it is a really old bug but wrong code, I'd like to backport > this also at least to 14-branch. Any reservations? If it passes regression testing,

Re: [PATCH] Fortran: different character lengths in array constructor [PR93289]

2025-02-01 Thread Steve Kargl
On Sat, Feb 01, 2025 at 09:49:17PM +0100, Harald Anlauf wrote: > Am 01.02.25 um 21:03 schrieb Steve Kargl: > > On Sat, Feb 01, 2025 at 07:25:51PM +0100, Harald Anlauf wrote: > > > > > > the attached patch downgrades different constant character lengths in an > >

Re: [PATCH] Fortran: different character lengths in array constructor [PR93289]

2025-02-01 Thread Steve Kargl
On Sat, Feb 01, 2025 at 07:25:51PM +0100, Harald Anlauf wrote: > > the attached patch downgrades different constant character lengths in an > array constructor from a GNU to a legacy extension, so that users get a > warning with -std=gnu. We continue to generate an error when standard > conforman

Re: [Patch, fortran] PR108434 - [12/13/14/15 Regression] ICE in class_allocatable, at fortran/expr.cc:5000

2025-01-10 Thread Steve Kargl
On Fri, Jan 10, 2025 at 05:19:34PM +, Paul Richard Thomas wrote: > > As of today, Gerhard Steinmetz has no fewer than 33 regressions to his name > out of a total of 54 for fortran and libgfortran. It's time that some of > these bugs are swatted, I think :-) > PR 70949 appears to have been fi

Re: [Patch, fortran] PR108434 - [12/13/14/15 Regression] ICE in class_allocatable, at fortran/expr.cc:5000

2025-01-10 Thread Steve Kargl
On Fri, Jan 10, 2025 at 05:19:34PM +, Paul Richard Thomas wrote: > > As of today, Gerhard Steinmetz has no fewer than 33 regressions to his name > out of a total of 54 for fortran and libgfortran. It's time that some of > these bugs are swatted, I think :-) > This patch fixes PR71844. As th

Re: [PATCH] Fortran: implement F2018 intrinsic OUT_OF_RANGE [PR115788]

2025-01-10 Thread Steve Kargl
On Fri, Jan 10, 2025 at 09:41:13PM +, Harald Anlauf wrote: > > There is one question to the reviewer(s), or those knowing better > than me how to handle IEEE infinity and NaN: with -Ofast, I needed > to add "-fno-finite-math-only" to the new testcase > gfortran.dg/ieee/out_of_range.f90, as the

Re: [Patch, fortran] PR108434 - [12/13/14/15 Regression] ICE in class_allocatable, at fortran/expr.cc:5000

2025-01-10 Thread Steve Kargl
On Fri, Jan 10, 2025 at 05:19:34PM +, Paul Richard Thomas wrote: > > As of today, Gerhard Steinmetz has no fewer than 33 regressions to his name > out of a total of 54 for fortran and libgfortran. It's time that some of > these bugs are swatted, I think :-) > When I was much more active in a

Re: [PATCH] fortran: Bump MOD_VERSION to "16" [PR118337]

2025-01-08 Thread Steve Kargl
On Wed, Jan 08, 2025 at 10:33:53AM +0100, Jakub Jelinek wrote: > > As mentioned in the PR, there is a *.mod incompatibility between GCC 14 and > GCC 15, at least when using iso_c_binding or iso_fortran_env intrinsic > modules, because new entries have been added to those modules in the middle, > c

Re: [patch, doc, Fortran] Further documentation of UNSIGNED

2025-01-07 Thread Steve Kargl
On Tue, Jan 07, 2025 at 03:28:31PM +0100, Thomas Koenig wrote: > Hello world, > > the attached patch does what it says in the ChangeLog entry. > > Tested with "make dvi" and "make pdf". > > OK for trunk? > OK. -- Steve

Re: [PATCH] Fortran: potential aliasing of complex pointer inquiry references [PR118120]

2024-12-19 Thread Steve Kargl
I'm ok withi your patch. It seems to also catch PR113928. You may want to give others a chance to chime in. -- steve On Thu, Dec 19, 2024 at 09:34:38PM +, Harald Anlauf wrote: > > the check for potential aliasing of lhs and rhs currently shortcuts > if the types differ. This is a problem

Re: [Fortran, Patch, PR117643] Implement F_C_STRING()

2024-12-18 Thread Steve Kargl
On Wed, Dec 18, 2024 at 10:09:26AM -0800, Jerry D wrote: > On 12/18/24 4:11 AM, Harald Anlauf wrote: > > Hi Steve, > > > > thanks for the draft patch. > > > > I haven't looked close enough, but you may have to add support > > for 'asis' being an optional dummy variable.  The following > > example

Re: [Fortran, Patch, PR117643] Implement F_C_STRING()

2024-12-18 Thread Steve Kargl
On Wed, Dec 18, 2024 at 01:11:14PM +0100, Harald Anlauf wrote: > > I haven't looked close enough, but you may have to add support > for 'asis' being an optional dummy variable. The following > example crashes here with a segfault: > (program snipped for brevity) > > There are other intrinsics

[Fortran, Patch, PR117643] Implement F_C_STRING()

2024-12-17 Thread Steve Kargl
All, First, I would like to thank both mikael and fx for providing help in my debugging of the in-lining in trans-intrinsic.cc. It seems I have forgotten much of what I once knew about trees. I have attached a patch that implements F2023 F_C_STRING() to https://gcc.gnu.org/bugzilla/show_bug.cgi?

Re: [Fortran, Patch, PR107635, Part 1] Rework handling of allocatable components in derived type coarrays.

2024-12-17 Thread Steve Kargl
On Mon, Dec 16, 2024 at 04:53:42AM -0800, Damian Rouson wrote: > including automatic GPU offloading. Then a few months ago, the death blow > that I couldn’t work around was robust support for kind type parameters. > gfortran doesn't have robust kind type parameters? % cat xx.f90 program foo

Re: [PATCH] Fortran: passing inquiry ref of complex array to assumed rank dummy [PR117774]

2024-11-25 Thread Steve Kargl
On Mon, Nov 25, 2024 at 10:05:49PM +, Harald Anlauf wrote: > Dear all, > > the attached patch fixes an ICE when passing an inquiry reference of a complex > array to an assumed-rank dummy argument by terminating the search for the > array reference before we hit the inquiry reference. (The arr

Re: *PING* [PATCH 0/7] fortran: Inline MINLOC/MAXLOC with DIM [PR90608]

2024-11-18 Thread Steve Kargl
On Fri, Nov 01, 2024 at 01:01:39PM +0100, Mikael Morin wrote: > Le 30/10/2024 à 23:00, Harald Anlauf a écrit : > > > > given that Jakub changed lots of whitespace in r15-4624-g50332a4fdd3243, > > you may want to rebase your patches onto HEAD of trunk. > > > > May I also suggest to attach the patc

Re: [patch, Fortran, committed] Handle unsigned constants in modules

2024-11-16 Thread Steve Kargl
On Sat, Nov 16, 2024 at 02:55:11PM +0100, Thomas Koenig wrote: > > Steve found a test case where unsigned constants were not handled > in a module. Single-line patch committed as obvious and simple, > r15-5341-g66096151afc6631f8f2a3458b154c5daa822b963 . > > Best regards > > Thomas > Than

Re: [patch, Fortran] Fix -mod(unsigned, unsigned)

2024-11-01 Thread Steve Kargl
On Fri, Nov 01, 2024 at 10:00:29AM +0100, Thomas Koenig wrote: > > during testing, I noticed that parameters of the form > - mod(u1,u2) were rejected with an unknown type. The fix > is straightforward, but required an adjustment to another > test case. > > Regression-tested. OK for trunk? > Ye

Re: [Patch, fortran] PR115700 - comment 5: uninitialized string length in ASSOCIATE

2024-10-30 Thread Steve Kargl
On Wed, Oct 30, 2024 at 04:41:40PM +, Paul Richard Thomas wrote: > This wrinkle to PR115700 came about because the associate-name string > length was not being initialized, when an array selector had a substring > reference with non-constant start or end. This, of course, caused > subsequent re

Re: [patch, Fortran, doc] Update descriptions for UNSIGNED

2024-10-26 Thread Steve Kargl
On Sat, Oct 26, 2024 at 05:16:54PM +0200, Thomas Koenig wrote: > > OK for trunk? > OK, but see below. > +@item @code{SUM}, @pxref{SUM} > +@item @code{TRANSPOSE}, @pxref{TRANSPOSE} > +@item @code{TRANSFER}, @pxref{TRANSFER} > @end itemize > + > +The following intrincis are enabled with @option{

Re: [patch, Fortran] FINDLOC for unsigned

2024-09-28 Thread Steve Kargl
On Sat, Sep 28, 2024 at 08:32:00PM +0200, Thomas Koenig wrote: > Hello world, > > here's another small patch for FINDLOC for unsigned. > > OK for trunk? > OK. Other than UNSIGNED being a new experimental feature, this patch almost qualifies as "Obvious". -- Steve

Re: [patch, Fortran] CSHIFT and EOSHIFT for unsigned

2024-09-28 Thread Steve Kargl
OK. Thanks for the patch. -- steve On Sat, Sep 28, 2024 at 09:33:20AM +0200, Thomas Koenig wrote: > > this patch, consisting almost entirely of the test cases, implements > CSHIFT and EOSHIFT for unsigneds. > > OK for trunk? > > Implement CSHIFT and EOSHIFT for unsigned. > > gcc/for

Re: [Fortran, Patch, PR81265, v1] Fix passing coarrays always w/ descriptor

2024-09-27 Thread Steve Kargl
On Fri, Sep 27, 2024 at 08:12:01PM +0200, Andre Vehreschild wrote: > > the testcase is in the coarray directory, where tests are executed mit > -fcoarray=single and lib. I don't know about none. Because the code stops > compiling when it encounters a coarray with no single or lib. Therefore I > su

Re: [Fortran, Patch, PR81265, v1] Fix passing coarrays always w/ descriptor

2024-09-27 Thread Steve Kargl
On Fri, Sep 27, 2024 at 03:20:43PM +0200, Andre Vehreschild wrote: > > attached patch fixes a runtime issue when a coarray was passed as > parameter to a procedure that was itself a parameter. The issue here > was that the coarray was passed as array pointer (i.e. w/o descriptor) > to the function

Re: *PING* [PATCH v3 10/10] fortran: Add -finline-intrinsics flag for MINLOC/MAXLOC [PR90608]

2024-09-14 Thread Steve Kargl
On Sat, Sep 14, 2024 at 11:02:42AM -0700, Steve Kargl wrote: > > While I understand the intent of 'positive form' vs 'negative form', the > above might be clearer as > >Usage of intrinsics can be implemented either by generating a call >to the libgf

Re: *PING* [PATCH v3 10/10] fortran: Add -finline-intrinsics flag for MINLOC/MAXLOC [PR90608]

2024-09-14 Thread Steve Kargl
On Fri, Sep 13, 2024 at 12:27:07PM +0200, Mikael Morin wrote: > > > > gcc/fortran/ChangeLog: > > > > * invoke.texi(finline-intrinsics): Document new flag. > > * lang.opt (finline-intrinsics, finline-intrinsics=, > > fno-inline-intrinsics): New flags. > > * options.cc (gfc_post_opt

Re: *PING* [PATCH] fortran: Remove useless nested end of scalarization chain handling

2024-09-13 Thread Steve Kargl
OK. Sorry about dropping the balli on a review. I thought it had already been approved and committed. -- steve On Fri, Sep 13, 2024 at 12:19:48PM +0200, Mikael Morin wrote: > Ping: > > https://gcc.gnu.org/pipermail/fortran/2024-July/060640.html > > Maybe I could argue that I can self approve,

Re: New version of unsiged patch

2024-09-06 Thread Steve Kargl
On Sun, Aug 18, 2024 at 12:10:18PM +0200, Thomas Koenig wrote: > Hello world, > > this version of the patch includes DOT_PRODUCT, MATMUL and quite > a few improvements for simplification. > All, I have gone through Thomas's current patch and sent a few emails with comments to him. To keep thin

Re: New version of unsiged patch

2024-09-06 Thread Steve Kargl
On Thu, Sep 05, 2024 at 09:07:20AM +0200, Thomas Koenig wrote: > Ping (a little bit)? > > With another weekend coming up, I would have some time to > work on incorporating any feedback, or on putting in > more intrinsics. > Last comment as I've made it to the end of the patch. Your testcases ar

Re: New version of unsiged patch

2024-09-06 Thread Steve Kargl
On Thu, Sep 05, 2024 at 09:07:20AM +0200, Thomas Koenig wrote: > Ping (a little bit)? > > With another weekend coming up, I would have some time to > work on incorporating any feedback, or on putting in > more intrinsics. > In the documentation, you have +Generally, unsigned integers are only p

Re: [PATCH] Fortran: downgrade use associated namelist group name to, legacy extension

2024-08-30 Thread Steve Kargl
ault) to a legacy extension (warning by default). > > The feature is tested in at least 4 gfortran testcases. I adjusted > the pattern of one of these tests to check for the downgrade. > > Regtested on x86_64-pc-linux-gnu. OK for mainline? > > Thanks, > Harald > >

Re: [PATCH, pushed] Fortran: fix ICE with use with rename of namelist member [PR116530]

2024-08-30 Thread Steve Kargl
On Fri, Aug 30, 2024 at 06:46:47PM +0200, Harald Anlauf wrote: > Am 30.08.24 um 18:33 schrieb Steve Kargl: > > On Thu, Aug 29, 2024 at 10:05:35PM +0200, Harald Anlauf wrote: > > > > > > > > > Should we downgrade this extension to GFC_STD_LEGACY? > >

Re: [PATCH, pushed] Fortran: fix ICE with use with rename of namelist member [PR116530]

2024-08-30 Thread Steve Kargl
On Thu, Aug 29, 2024 at 10:05:35PM +0200, Harald Anlauf wrote: > > Am 29.08.24 um 21:53 schrieb Steve Kargl: > > Thanks for the patch. If you have not already opened a new PR for the > > other issue with C8107, I'll open one later today. It's likely that > > w

Re: [PATCH, pushed] Fortran: fix ICE with use with rename of namelist member [PR116530]

2024-08-29 Thread Steve Kargl
Thanks for the patch. If you have not already opened a new PR for the other issue with C8107, I'll open one later today. It's likely that we need to check the namelist-group-name for USE association in match.cc:gfc_match_namelist. Hmmm, it seems we already catch the error, but accept it as an ex

Re: New version of unsiged patch

2024-08-27 Thread Steve Kargl
On Tue, Aug 27, 2024 at 06:46:08PM +0200, Thomas Koenig wrote: > Steve, > > > On Sun, Aug 18, 2024 at 12:10:18PM +0200, Thomas Koenig wrote: > > > > > > this version of the patch includes DOT_PRODUCT, MATMUL and quite > > > a few improvements for simplification. > > > > Thomas, > > > > Your upd

Re: [Fortran, Patch, PR86468, v1] Follow up: Remove obsolete VIEW_CONVERT

2024-08-21 Thread Steve Kargl
On Wed, Aug 21, 2024 at 12:17:46PM +0200, Andre Vehreschild wrote: > > attached small patch removes a VIEW_CONVERT that I erroneously inserted during > patching pr110033. PR86468 fixes the (co-)rank computation and therefore this > VIEW_CONVERT is IMO obsolete. I think it may cause hard to find ru

Re: New version of unsiged patch

2024-08-19 Thread Steve Kargl
On Sun, Aug 18, 2024 at 12:10:18PM +0200, Thomas Koenig wrote: > > this version of the patch includes DOT_PRODUCT, MATMUL and quite > a few improvements for simplification. Thomas, Your updated patch applied cleanly on top-of-tree gcc. Bootstrap and regression testing on amd64-*-freebsd comple

Re: [PATCH 0/8] fortran: Inline MINLOC/MAXLOC without DIM argument [PR90608]

2024-08-08 Thread Steve Kargl
On Thu, Aug 08, 2024 at 11:09:10AM +0200, Mikael Morin wrote: > > These patches are about inlining, there is no manipulation of the parse > tree. So I would rather use a separate option (-finline-intrinsics?). I've only followed the discussion from afar, but gcc already supports a -finline and -

Re: Ping: [Patch, fortran] PR115070 (and PR115348) - [13/14/15 Regression] ICE using IEEE_ARITHMETIC in a derived type method with class, intent(out)

2024-07-19 Thread Steve Kargl
Thanks for the patch and chasing down the magic. Path is ok to commit. -- steve On Fri, Jul 19, 2024 at 05:32:26PM +0100, Paul Richard Thomas wrote: > Hi All, > > Ping! > > I understand now why this works. The scope of the block is merged and so > all the previous declarations that would othe

Re: [PATCH] Fortran: fix ALLOCATE with SOURCE of deferred character length [PR114019]

2024-06-28 Thread Steve Kargl
On Fri, Jun 28, 2024 at 10:00:53PM +0200, Harald Anlauf wrote: > > the attached patch fixes an ICE occuring for ALLOCATE with SOURCE > (or MOLD) of deferred character length in the scalar case, which > looked obscure because the ICE disappears at -O1 and higher. > > The dump tree suggests that it

Re: [pushed] readings: Drop FORTRAN 77 test suite at itl.nist.gov

2024-06-18 Thread Steve Kargl
On Tue, Jun 18, 2024 at 09:13:23AM +0200, Gerald Pfeifer wrote: > The original subsite has disappeared and we couldn't find it elsewhere. > https://github.com/gklimowicz/FCVS gklimowicz is a flang developer and member of J3. -- Steve

Re: [PATCH 2/4] fortran: Teach get_real_kind_from_node for Power 128 fp modes [PR112993]g

2024-05-09 Thread Steve Kargl
On Thu, May 09, 2024 at 01:37:32PM +0800, Kewen.Lin wrote: > > > > > That said, Fortran has the concept of model numbers, which > > are set in arith.c. Does this change give the expected > > value for ibm128? For example, with "REAL(16) X", one > > has "DIGITS(X) = 113", which is the precision

Re: [PATCH 2/4] fortran: Teach get_real_kind_from_node for Power 128 fp modes [PR112993]g

2024-05-08 Thread Steve Kargl
On Wed, May 08, 2024 at 01:27:53PM +0800, Kewen.Lin wrote: > > Previously effective target fortran_real_c_float128 never > passes on Power regardless of the default 128 long double > is ibmlongdouble or ieeelongdouble. It's due to that TF > mode is always used for kind 16 real, which has precisio

Re: [PATCH] fortran: Fix specification expression check in submodules [PR114475]

2024-03-27 Thread Steve Kargl
On Wed, Mar 27, 2024 at 04:30:42PM +0100, Mikael Morin wrote: > Hell(o), > > it didn't take long for my recent patch for PR111781 to show a regression. > The fix proposed here is actually the one Harald posted in the PR. > I can't imagine a case where it wouldn't do the right thing. > Regression t

Re: [PATCH] Fortran: add two small F2023 features

2024-03-19 Thread Steve Kargl
On Tue, Mar 19, 2024 at 04:17:32PM +0100, FX Coudert wrote: > > These two (independent) patches add two tiny Fortran 2023 features: new > ISO_FORTRAN_ENV named constants and SELECTED_LOGICAL_KIND intrinsic. > > Bootstrapped and regtested on x86_64-pc-linux-gnu. > Please review, and let me know i

Re: [patch, libgfortran] Part 2: PR105456 Child I/O does not propage iostat

2024-03-05 Thread Steve Kargl
On Tue, Mar 05, 2024 at 08:06:10PM -0800, Jerry D wrote: > On 3/5/24 1:51 PM, Harald Anlauf wrote: > > Hi Jerry, > > > > on further thought, do we sanitize 'child_iomsg'? > > We pass it to snprintf as format. > > > > Wouldn't a strncpy be sufficient? > > > > Harald > > > > > > Just to be safe

Re: [patch, libgfortran] Part 2: PR105456 Child I/O does not propage iostat

2024-02-29 Thread Steve Kargl
On Thu, Feb 29, 2024 at 09:36:43AM -0800, Jerry D wrote: > On 2/29/24 1:47 AM, Bernhard Reutner-Fischer wrote: > > > And, just for my own education, the length limitation of iomsg to 255 > > chars is not backed by the standard AFAICS, right? It's just our > > STRERR_MAXSZ? > > Yes, its what we ha

Rejects ASSOCIATE and a complex part%ref when target is a function

2024-02-27 Thread Steve Kargl
All, Consider, ! { dg-do run } program foo implicit none real y associate (x => log(cmplx(-1,0))) y = x%im if (int(100*y)-314 /= 0) stop 1 end associate end program % gfcx -c a.f90 a.f90:6:13: 6 | y = x%im | 1 Error: Symbol 'x' at (1) has no I

Re: [PATCH, v2] Fix fortran/PR114024

2024-02-23 Thread Steve Kargl
On Fri, Feb 23, 2024 at 10:15:17PM +0100, Harald Anlauf wrote: > Hi Steve, all, > > here's an updated patch with an enhanced testcase that also > checks MOLD= besides SOURCE=. > > Regtested on x86_64-pc-linux-gnu. Is it OK for mainline? > >From my viewpoint, yes. Thanks for finding a better s

Re: [PATCH] Fix fortran/PR114024

2024-02-22 Thread Steve Kargl
On Thu, Feb 22, 2024 at 09:22:37PM +0100, Harald Anlauf wrote: > Hi Steve! > > On 2/22/24 01:52, Steve Kargl wrote: > > On Wed, Feb 21, 2024 at 01:42:32PM -0800, Steve Kargl wrote: > > > On Wed, Feb 21, 2024 at 10:20:43PM +0100, Harald Anlauf wrote: > > > >

Re: [PATCH] Fix fortran/PR114024

2024-02-21 Thread Steve Kargl
On Wed, Feb 21, 2024 at 01:42:32PM -0800, Steve Kargl wrote: > On Wed, Feb 21, 2024 at 10:20:43PM +0100, Harald Anlauf wrote: > > On 2/21/24 22:00, Steve Kargl wrote: > > > memleak vs ICE. I think I'll take one over the other. > > > Probably need to free code->

  1   2   3   4   5   6   7   8   9   10   >