Re: [Linaro-TCWG-CI] gcc patch #105542: 12 regressions on arm
On Tue, Jan 28, 2025 at 10:32 AM Jerry D wrote: > > > Before I go clicking on links, is this legit? I presume patches are > getting checked before being pushed. Yes this is a legit email from the Linaro automation. And yes patches are being tested before they get pushed to help developers just in case things like this are missed. I don't see why arm would be different from any other target here though and why it is failing for arm only. Thanks, Andrew > > I do not have an arm based machine to test on. > > Regards, > > Jerry > > Forwarded Message > Subject: [Linaro-TCWG-CI] gcc patch #105542: 12 regressions on arm > Date: Tue, 28 Jan 2025 11:04:22 + (UTC) > From: ci_not...@linaro.org > Reply-To: linaro-toolch...@lists.linaro.org > To: jvdelis...@gmail.com > > Dear contributor, > > Our automatic CI has detected problems related to your patch(es). Please > find some details below. > > In gcc_check master-arm, after: >| gcc patch https://patchwork.sourceware.org/patch/105542 >| Author: Jerry D >| Date: Mon Jan 27 19:41:04 2025 -0800 >| | [patch, libfortran] PR114618 Format produces incorrect > output when contains 1x, ok when uses " " >| | Hello all, >| | The attached patch is part 1 of my effort to fix these > X and T edit >| ... 58 lines of the commit log omitted. >| ... applied on top of baseline commit: >| 846f08623b4 Remove ChangeLog entry that shouldn't be there. > > Produces 12 regressions: >| | regressions.sum: >| Running gfortran:gfortran.dg/dg.exp ... >| FAIL: gfortran.dg/char4_iunit_2.f03 -O0 execution test >| FAIL: gfortran.dg/char4_iunit_2.f03 -O1 execution test >| FAIL: gfortran.dg/char4_iunit_2.f03 -O2 execution test >| FAIL: gfortran.dg/char4_iunit_2.f03 -O3 -fomit-frame-pointer > -funroll-loops -fpeel-loops -ftracer -finline-functions execution test >| ... and 8 more > > Used configuration : > *CI config* tcwg_gcc_check master-arm > *configure and test flags:* --target arm-linux-gnueabihf > > If you have any questions regarding this report, please ask on > linaro-toolch...@lists.linaro.org mailing list. > > -8<--8<--8<-- > > The information below contains the details of the failures, and the ways > to reproduce a debug environment: > > You can find the failure logs in *.log.1.xz files in > * > https://ci.linaro.org/job/tcwg_gcc_check--master-arm-precommit/10959/artifact/artifacts/artifacts.precommit/00-sumfiles/ > The full lists of regressions and improvements as well as configure and > make commands are in > * > https://ci.linaro.org/job/tcwg_gcc_check--master-arm-precommit/10959/artifact/artifacts/artifacts.precommit/notify/ > The list of [ignored] baseline and flaky failures are in > * > https://ci.linaro.org/job/tcwg_gcc_check--master-arm-precommit/10959/artifact/artifacts/artifacts.precommit/sumfiles/xfails.xfail > > Current build : > https://ci.linaro.org/job/tcwg_gcc_check--master-arm-precommit/10959/artifact/artifacts > Reference build : > https://ci.linaro.org/job/tcwg_gcc_check--master-arm-build/3353/artifact/artifacts > > Warning: we do not enable maintainer-mode nor automatically update > generated files, which may lead to failures if the patch modifies the > master files.
Re: [Linaro-TCWG-CI] gcc patch #105542: 12 regressions on arm
On 1/28/25 10:40 AM, Andrew Pinski wrote: On Tue, Jan 28, 2025 at 10:32 AM Jerry D wrote: Before I go clicking on links, is this legit? I presume patches are getting checked before being pushed. Yes this is a legit email from the Linaro automation. And yes patches are being tested before they get pushed to help developers just in case things like this are missed. I don't see why arm would be different from any other target here though and why it is failing for arm only. Thanks, Andrew OK I will have a look and be clueless for a little while. ;) Jerry I do not have an arm based machine to test on. Regards, Jerry Forwarded Message Subject: [Linaro-TCWG-CI] gcc patch #105542: 12 regressions on arm Date: Tue, 28 Jan 2025 11:04:22 + (UTC) From: ci_not...@linaro.org Reply-To: linaro-toolch...@lists.linaro.org To: jvdelis...@gmail.com Dear contributor, Our automatic CI has detected problems related to your patch(es). Please find some details below. In gcc_check master-arm, after: | gcc patch https://patchwork.sourceware.org/patch/105542 | Author: Jerry D | Date: Mon Jan 27 19:41:04 2025 -0800 | | [patch, libfortran] PR114618 Format produces incorrect output when contains 1x, ok when uses " " | | Hello all, | | The attached patch is part 1 of my effort to fix these X and T edit | ... 58 lines of the commit log omitted. | ... applied on top of baseline commit: | 846f08623b4 Remove ChangeLog entry that shouldn't be there. Produces 12 regressions: | | regressions.sum: | Running gfortran:gfortran.dg/dg.exp ... | FAIL: gfortran.dg/char4_iunit_2.f03 -O0 execution test | FAIL: gfortran.dg/char4_iunit_2.f03 -O1 execution test | FAIL: gfortran.dg/char4_iunit_2.f03 -O2 execution test | FAIL: gfortran.dg/char4_iunit_2.f03 -O3 -fomit-frame-pointer -funroll-loops -fpeel-loops -ftracer -finline-functions execution test | ... and 8 more Used configuration : *CI config* tcwg_gcc_check master-arm *configure and test flags:* --target arm-linux-gnueabihf If you have any questions regarding this report, please ask on linaro-toolch...@lists.linaro.org mailing list. -8<--8<--8<-- The information below contains the details of the failures, and the ways to reproduce a debug environment: You can find the failure logs in *.log.1.xz files in * https://ci.linaro.org/job/tcwg_gcc_check--master-arm-precommit/10959/artifact/artifacts/artifacts.precommit/00-sumfiles/ The full lists of regressions and improvements as well as configure and make commands are in * https://ci.linaro.org/job/tcwg_gcc_check--master-arm-precommit/10959/artifact/artifacts/artifacts.precommit/notify/ The list of [ignored] baseline and flaky failures are in * https://ci.linaro.org/job/tcwg_gcc_check--master-arm-precommit/10959/artifact/artifacts/artifacts.precommit/sumfiles/xfails.xfail Current build : https://ci.linaro.org/job/tcwg_gcc_check--master-arm-precommit/10959/artifact/artifacts Reference build : https://ci.linaro.org/job/tcwg_gcc_check--master-arm-build/3353/artifact/artifacts Warning: we do not enable maintainer-mode nor automatically update generated files, which may lead to failures if the patch modifies the master files.
Fwd: [Linaro-TCWG-CI] gcc patch #105542: 12 regressions on arm
Before I go clicking on links, is this legit? I presume patches are getting checked before being pushed. I do not have an arm based machine to test on. Regards, Jerry Forwarded Message Subject: [Linaro-TCWG-CI] gcc patch #105542: 12 regressions on arm Date: Tue, 28 Jan 2025 11:04:22 + (UTC) From: ci_not...@linaro.org Reply-To: linaro-toolch...@lists.linaro.org To: jvdelis...@gmail.com Dear contributor, Our automatic CI has detected problems related to your patch(es). Please find some details below. In gcc_check master-arm, after: | gcc patch https://patchwork.sourceware.org/patch/105542 | Author: Jerry D | Date: Mon Jan 27 19:41:04 2025 -0800 | | [patch, libfortran] PR114618 Format produces incorrect output when contains 1x, ok when uses " " | | Hello all, | | The attached patch is part 1 of my effort to fix these X and T edit | ... 58 lines of the commit log omitted. | ... applied on top of baseline commit: | 846f08623b4 Remove ChangeLog entry that shouldn't be there. Produces 12 regressions: | | regressions.sum: | Running gfortran:gfortran.dg/dg.exp ... | FAIL: gfortran.dg/char4_iunit_2.f03 -O0 execution test | FAIL: gfortran.dg/char4_iunit_2.f03 -O1 execution test | FAIL: gfortran.dg/char4_iunit_2.f03 -O2 execution test | FAIL: gfortran.dg/char4_iunit_2.f03 -O3 -fomit-frame-pointer -funroll-loops -fpeel-loops -ftracer -finline-functions execution test | ... and 8 more Used configuration : *CI config* tcwg_gcc_check master-arm *configure and test flags:* --target arm-linux-gnueabihf If you have any questions regarding this report, please ask on linaro-toolch...@lists.linaro.org mailing list. -8<--8<--8<-- The information below contains the details of the failures, and the ways to reproduce a debug environment: You can find the failure logs in *.log.1.xz files in * https://ci.linaro.org/job/tcwg_gcc_check--master-arm-precommit/10959/artifact/artifacts/artifacts.precommit/00-sumfiles/ The full lists of regressions and improvements as well as configure and make commands are in * https://ci.linaro.org/job/tcwg_gcc_check--master-arm-precommit/10959/artifact/artifacts/artifacts.precommit/notify/ The list of [ignored] baseline and flaky failures are in * https://ci.linaro.org/job/tcwg_gcc_check--master-arm-precommit/10959/artifact/artifacts/artifacts.precommit/sumfiles/xfails.xfail Current build : https://ci.linaro.org/job/tcwg_gcc_check--master-arm-precommit/10959/artifact/artifacts Reference build : https://ci.linaro.org/job/tcwg_gcc_check--master-arm-build/3353/artifact/artifacts Warning: we do not enable maintainer-mode nor automatically update generated files, which may lead to failures if the patch modifies the master files.
Re: [PATCH] [OpenACC] Add tests for implied copy of variables in reduction clause.
Hi! On 2023-12-20T14:48:29+, Abid Qadeer wrote: > From: Hafiz Abid Qadeer > > The OpenACC reduction clause on compute construct implies a copy clause > for each reduction variable [1]. This patch adds tests to check if the > implied copy is being generated. The check covers various types and > operators as described in the specification. > > [...] > > [1] OpenACC 2.7 Specification section 2.5.13 Pushed to trunk branch in commit 115255589cba449f1b10464f47646bda69c768fb "Add tests for implied copy of variables in reduction clause", see attached. Grüße Thomas >From 115255589cba449f1b10464f47646bda69c768fb Mon Sep 17 00:00:00 2001 From: Hafiz Abid Qadeer Date: Wed, 20 Dec 2023 14:48:29 + Subject: [PATCH] Add tests for implied copy of variables in reduction clause. The OpenACC reduction clause on compute construct implies a copy clause for each reduction variable [1]. This patch adds tests to check if the implied copy is being generated. The check covers various types and operators as described in the specification. [1] OpenACC 2.7 Specification section 2.5.13 gcc/testsuite/ChangeLog: * c-c++-common/goacc/implied-copy-1.c: New test. * c-c++-common/goacc/implied-copy-2.c: New test. * g++.dg/goacc/implied-copy.C: New test. * gcc.dg/goacc/implied-copy.c: New test. * gfortran.dg/goacc/implied-copy-1.f90: New test. * gfortran.dg/goacc/implied-copy-2.f90: New test. --- .../c-c++-common/goacc/implied-copy-1.c | 33 .../c-c++-common/goacc/implied-copy-2.c | 121 + gcc/testsuite/g++.dg/goacc/implied-copy.C | 24 +++ gcc/testsuite/gcc.dg/goacc/implied-copy.c | 29 .../gfortran.dg/goacc/implied-copy-1.f90 | 35 .../gfortran.dg/goacc/implied-copy-2.f90 | 160 ++ 6 files changed, 402 insertions(+) create mode 100644 gcc/testsuite/c-c++-common/goacc/implied-copy-1.c create mode 100644 gcc/testsuite/c-c++-common/goacc/implied-copy-2.c create mode 100644 gcc/testsuite/g++.dg/goacc/implied-copy.C create mode 100644 gcc/testsuite/gcc.dg/goacc/implied-copy.c create mode 100644 gcc/testsuite/gfortran.dg/goacc/implied-copy-1.f90 create mode 100644 gcc/testsuite/gfortran.dg/goacc/implied-copy-2.f90 diff --git a/gcc/testsuite/c-c++-common/goacc/implied-copy-1.c b/gcc/testsuite/c-c++-common/goacc/implied-copy-1.c new file mode 100644 index 000..ae06339dc2d --- /dev/null +++ b/gcc/testsuite/c-c++-common/goacc/implied-copy-1.c @@ -0,0 +1,33 @@ +/* { dg-additional-options "-fdump-tree-gimple" } */ + +/* Test for implied copy of reduction variable on combined construct. */ +void test1 (void) +{ + int i, sum = 0, prod = 1, a[100]; + + #pragma acc kernels loop reduction(+:sum) reduction(*:prod) + for (int i = 0; i < 10; ++i) + { +sum += a[i]; +prod *= a[i]; + } + + #pragma acc parallel loop reduction(+:sum) reduction(*:prod) + for (int i = 0; i < 10; ++i) + { +sum += a[i]; +prod *= a[i]; + } + + #pragma acc serial loop reduction(+:sum) reduction(*:prod) + for (int i = 0; i < 10; ++i) + { +sum += a[i]; +prod *= a[i]; + } +} + +/* { dg-final { scan-tree-dump-times "map\\(force_tofrom:sum \\\[len: \[0-9\]+\\\]\\)" 1 "gimple" } } */ +/* { dg-final { scan-tree-dump-times "map\\(force_tofrom:prod \\\[len: \[0-9\]+\\\]\\)" 1 "gimple" } } */ +/* { dg-final { scan-tree-dump-times "map\\(tofrom:sum \\\[len: \[0-9\]+\\\]\\)" 2 "gimple" } } */ +/* { dg-final { scan-tree-dump-times "map\\(tofrom:prod \\\[len: \[0-9\]+\\\]\\)" 2 "gimple" } } */ diff --git a/gcc/testsuite/c-c++-common/goacc/implied-copy-2.c b/gcc/testsuite/c-c++-common/goacc/implied-copy-2.c new file mode 100644 index 000..9f5e2dce79c --- /dev/null +++ b/gcc/testsuite/c-c++-common/goacc/implied-copy-2.c @@ -0,0 +1,121 @@ +/* { dg-additional-options "-fdump-tree-gimple" } */ + +/* Test that reduction on compute construct implies a copy of the reduction + variable . */ + +#define n 1000 + +#if __cplusplus + typedef bool BOOL; +#else + typedef _Bool BOOL; +#endif + +int +main(void) +{ + int i; + int sum = 0; + int prod = 1; + int result = 0; + int tmp = 1; + int array[n]; + + double sumd = 0.0; + double arrayd[n]; + + float sumf = 0.0; + float arrayf[n]; + + char sumc; + char arrayc[n]; + + BOOL lres; + +#pragma acc parallel reduction(+:sum, sumf, sumd, sumc) reduction(*:prod) + for (i = 0; i < n; i++) +{ + sum += array[i]; + sumf += arrayf[i]; + sumd += arrayd[i]; + sumc += arrayc[i]; + prod *= array[i]; +} + +#pragma acc parallel reduction (max:result) + for (i = 0; i < n; i++) +result = result > array[i] ? result : array[i]; + +#pragma acc parallel reduction (min:result) + for (i = 0; i < n; i++) +result = result < array[i] ? result : array[i]; + +#pragma acc parallel reduction (&:result) + for (i = 0; i < n; i++) +result &= array[i]; + +#pragma acc parallel reduction (|:result) + for (i = 0; i < n; i++) +result |= array[i]; + +#pragma acc parallel reduct
Re: [patch, libfortran] PR114618 Format produces incorrect output when contains 1x, ok when uses " "
Jerry, while I haven't read your actual patch yet, I think the testcase is slightly incorrect. In fact, Intel, NAG, Nvidia and AMD flang disagree with it. Adding the following lines before the check with the STOP statement: write(*,'(a)') output1 write(*,'(a)') output2 write (*, fmt1) 'RADIX', radix(pi) write (*, fmt2) 'RADIX', radix(pi) I get (e.g. with NAG): RADIX.. 2 RADIX . 2 RADIX.. 2 RADIX . 2 STOP: 1 After your patch I get with gfc-15: RADIX . 2 RADIX . 2 RADIX . 2 RADIX . 2 So I think the treatment of 1x is wrong: it should skip one position, not write a blank here. >>> F2023 13.8.1.3 X editing The nX edit descriptor indicates that the transmission of the next character to or from a record is to occur at the character position n characters forward from the current position. NOTE An nX edit descriptor has the same effect as a TRn edit descriptor. <<< Cheers, Harald Am 28.01.25 um 04:41 schrieb Jerry D: Hello all, The attached patch is part 1 of my effort to fix these X and T edit descriptor issues. This one cleans up some really ugly output. Before the patch with the test case provided by the reporter: PI.^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@ 3.1415926535897931 REAL(PI)...^@^@^@^@^@^@^@^@^@^@^@ 3.14159274 DBLE(PI)...^@^@^@^@^@^@^@^@^@^@^@ 3.1415926535897931 RADIX..^@^@^@^@^@^@^@^@^@^@^@ 3. 2 RANGE..^@^@^@^@^@^@^@^@^@^@^@ 3. 307 PRECISION..^@^@^@^@^@^@^@^@^@^@ 15 Which is complete garbage. After the patch: PI 3.1415926535897931 REAL(PI) .. 3.14159274 DBLE(PI) .. 3.1415926535897931 RADIX . 2 RANGE . 307 PRECISION . 15 I greatly reduced the test case included in the patch. While working on this one I discovered other problems not addressed by this patch and I will address these through PR113897. You will see some changes in the factoring of some of the code in the case FMT_X:, case FMT_TR:, case FMT_TL:, case FMT_T:. I anticipate in part 2 that I will be doing more specific changes on these. Regression tested on x86_64_linux_gnu. OK for trunk? Regards, Jerry Author: Jerry DeLisle Date: Mon Jan 27 19:08:46 2025 -0800 Fortran: Fix handling of the X edit descriptor. This patch is a partial fix of handling of X edit descriptors when combined with certain T edit descriptors. PR libfortran/114618 libgfortran/ChangeLog: * io/transfer.c (formatted_transfer_scalar_write): Change name of vriable 'pos' to 'tab_pos' to improve clarity. Add new variable next_pos when calculating the maximum position. Update the calculation of pending spaces. gcc/testsuite/ChangeLog: * gfortran.dg/pr114618.f90: New test.
Re: [patch, libfortran] PR114618 Format produces incorrect output when contains 1x, ok when uses " "
On 1/28/25 1:33 PM, Harald Anlauf wrote: Jerry, while I haven't read your actual patch yet, I think the testcase is slightly incorrect. In fact, Intel, NAG, Nvidia and AMD flang disagree with it. I also installed flang and noticed this. I also received a auto patch test on ARM that causes me to hold off a bit. I am able to trigger a floating point exception on another test case I put together which tells me its blowing out of the fbuf somewhere. I am going to keep digging. Adding the following lines before the check with the STOP statement: write(*,'(a)') output1 write(*,'(a)') output2 write (*, fmt1) 'RADIX', radix(pi) write (*, fmt2) 'RADIX', radix(pi) I get (e.g. with NAG): RADIX.. 2 RADIX . 2 RADIX.. 2 RADIX . 2 STOP: 1 After your patch I get with gfc-15: RADIX . 2 RADIX . 2 RADIX . 2 RADIX . 2 So I think the treatment of 1x is wrong: it should skip one position, not write a blank here. >>> F2023 13.8.1.3 X editing The nX edit descriptor indicates that the transmission of the next character to or from a record is to occur at the character position n characters forward from the current position. NOTE An nX edit descriptor has the same effect as a TRn edit descriptor. Good info I missed. <<< Cheers, Harald Thanks for feedback. Jerry
Re: [PATCH] Fortran: fix passing of component ref to assumed-rank dummy [PR118683]
On 1/28/25 12:49 PM, Harald Anlauf wrote: Dear all, the attached simple and obvious patch fixes an issue found when running a UBSAN instrumented compiler on a recent testcase, see PR. Also verified when running f951 under gdb on that testcase. I intend to commit within the next 24 hours unless there are comments. Regtested on x86_64-pc-linux-gnu. Will also backport to 14-branch, which has the same code. Thanks, Harald Good to go. Jerry
[PATCH] Fortran: fix passing of component ref to assumed-rank dummy [PR118683]
Dear all, the attached simple and obvious patch fixes an issue found when running a UBSAN instrumented compiler on a recent testcase, see PR. Also verified when running f951 under gdb on that testcase. I intend to commit within the next 24 hours unless there are comments. Regtested on x86_64-pc-linux-gnu. Will also backport to 14-branch, which has the same code. Thanks, Harald From b6309e6fe318b8f63eed1a1a68c78c43fcf38ab4 Mon Sep 17 00:00:00 2001 From: Harald Anlauf Date: Tue, 28 Jan 2025 21:21:40 +0100 Subject: [PATCH] Fortran: fix passing of component ref to assumed-rank dummy [PR118683] While the fix for pr117774 addressed the passing of an inquiry reference to an assumed-rank dummy, it missed the similar case of passing a component reference. The newer testcase gfortran.dg/pr81978.f90 uncovered this latent issue with a UBSAN instrumented compiler. PR fortran/118683 gcc/fortran/ChangeLog: * trans-expr.cc (gfc_conv_procedure_call): The bounds update for passing to assumed-rank dummies shall also handle component references besides inquiry references. --- gcc/fortran/trans-expr.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gcc/fortran/trans-expr.cc b/gcc/fortran/trans-expr.cc index 78caf1f8996..24b1d19537b 100644 --- a/gcc/fortran/trans-expr.cc +++ b/gcc/fortran/trans-expr.cc @@ -7495,6 +7495,9 @@ gfc_conv_procedure_call (gfc_se * se, gfc_symbol * sym, { if (ref->next->type == REF_INQUIRY) break; + if (ref->type == REF_ARRAY + && ref->u.ar.type != AR_ELEMENT) + break; }; if (ref->u.ar.type == AR_FULL && ref->u.ar.as->type != AS_ASSUMED_SIZE) -- 2.43.0