[Bug fortran/103789] ICE when providing kind argument to mask{l,r}

2022-01-17 Thread mikael at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103789

Mikael Morin  changed:

   What|Removed |Added

 Resolution|--- |FIXED
 Status|NEW |RESOLVED
   Assignee|unassigned at gcc dot gnu.org  |mikael at gcc dot 
gnu.org

--- Comment #9 from Mikael Morin  ---
Finally fixed for upcoming 12.1 and 11.3 versions.

[Bug fortran/103789] ICE when providing kind argument to mask{l,r}

2022-01-17 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103789

--- Comment #8 from CVS Commits  ---
The releases/gcc-11 branch has been updated by Mikael Morin
:

https://gcc.gnu.org/g:d7a44809924297a2ff26b6b1d040c72c22f07346

commit r11-9471-gd7a44809924297a2ff26b6b1d040c72c22f07346
Author: Mikael Morin 
Date:   Mon Jan 17 11:45:46 2022 +0100

Fortran: Ignore KIND argument of a few more intrinsics. [PR103789]

After PR97896 for which some code was added to ignore the KIND argument
of the INDEX intrinsics, and PR87711 for which that was extended to
LEN_TRIM
as well, this propagates it further to MASKL, MASKR, SCAN and VERIFY.

PR fortran/103789

gcc/fortran/ChangeLog:

* trans-array.c (arg_evaluated_for_scalarization): Add MASKL,
MASKR,
SCAN and VERIFY to the list of intrinsics whose KIND argument is to
be
ignored.

(cherry picked from commit c1c17a43e172ebc28f2cd247f6e83c5fdbc6219f)

[Bug fortran/103789] ICE when providing kind argument to mask{l,r}

2022-01-16 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103789

--- Comment #7 from CVS Commits  ---
The releases/gcc-11 branch has been updated by Mikael Morin
:

https://gcc.gnu.org/g:024fd4fb5a1ba742242eec84149f159518444ae3

commit r11-9469-g024fd4fb5a1ba742242eec84149f159518444ae3
Author: Mikael Morin 
Date:   Sun Jan 16 18:33:36 2022 +0100

testsuite: Enrich tests with variants failing on the branch.

Backporting the fix for pr103789 on the 11 branch revealed a lack of test
coverage for the tests provided with that fix.  Indeed, the tests use the
KIND
argument of the respective intrinsics only with keyword arguments.
This adds variants with non-keyword arguments.

The tests enriched this way fail on the branch if the fix is cherry-picked
straightforwardly.  The fix will have to be tweaked slightly there.

PR fortran/103789
PR fortran/87711
PR fortran/97896

gcc/testsuite/ChangeLog:

* gfortran.dg/maskl_1.f90: Enrich test with usages of MASKL with
a non-keyword KIND argument.
* gfortran.dg/maskr_1.f90: Same for MASKR.
* gfortran.dg/scan_3.f90: Same for SCAN.
* gfortran.dg/verify_3.f90: Same for VERIFY.

(cherry picked from commit 15630e6e9eb019477d1fc5c0966b43979e18ae18)

[Bug fortran/103789] ICE when providing kind argument to mask{l,r}

2022-01-16 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103789

--- Comment #6 from CVS Commits  ---
The releases/gcc-11 branch has been updated by Mikael Morin
:

https://gcc.gnu.org/g:8d394947776ad2b3ab8376dbf3c198f357bcd322

commit r11-9468-g8d394947776ad2b3ab8376dbf3c198f357bcd322
Author: Mikael Morin 
Date:   Fri Jan 7 22:34:59 2022 +0100

Fortran: Ignore KIND argument of a few more intrinsics. [PR103789]

After PR97896 for which some code was added to ignore the KIND argument
of the INDEX intrinsics, and PR87711 for which that was extended to
LEN_TRIM
as well, this propagates it further to MASKL, MASKR, SCAN and VERIFY.

PR fortran/103789

gcc/fortran/ChangeLog:

* trans-array.c (arg_evaluated_for_scalarization): Add MASKL,
MASKR,
SCAN and VERIFY to the list of intrinsics whose KIND argument is to
be
ignored.

gcc/testsuite/ChangeLog:

* gfortran.dg/maskl_1.f90: New test.
* gfortran.dg/maskr_1.f90: New test.
* gfortran.dg/scan_3.f90: New test.
* gfortran.dg/verify_3.f90: New test.

(cherry picked from commit c1c17a43e172ebc28f2cd247f6e83c5fdbc6219f)

[Bug fortran/103789] ICE when providing kind argument to mask{l,r}

2022-01-16 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103789

--- Comment #5 from CVS Commits  ---
The master branch has been updated by Mikael Morin :

https://gcc.gnu.org/g:15630e6e9eb019477d1fc5c0966b43979e18ae18

commit r12-6613-g15630e6e9eb019477d1fc5c0966b43979e18ae18
Author: Mikael Morin 
Date:   Sun Jan 16 18:33:36 2022 +0100

testsuite: Enrich tests with variants failing on the branch.

Backporting the fix for pr103789 on the 11 branch revealed a lack of test
coverage for the tests provided with that fix.  Indeed, the tests use the
KIND
argument of the respective intrinsics only with keyword arguments.
This adds variants with non-keyword arguments.

The tests enriched this way fail on the branch if the fix is cherry-picked
straightforwardly.  The fix will have to be tweaked slightly there.

PR fortran/103789
PR fortran/87711
PR fortran/97896

gcc/testsuite/ChangeLog:

* gfortran.dg/index_5.f90: Enrich test with usages of INDEX with
a non-keyword KIND argument.
* gfortran.dg/len_trim.f90: Same for LEN_TRIM.
* gfortran.dg/maskl_1.f90: Same for MASKL.
* gfortran.dg/maskr_1.f90: Same for MASKR.
* gfortran.dg/scan_3.f90: Same for SCAN.
* gfortran.dg/verify_3.f90: Same for VERIFY.

[Bug fortran/103789] ICE when providing kind argument to mask{l,r}

2022-01-09 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103789

--- Comment #4 from CVS Commits  ---
The master branch has been updated by Mikael Morin :

https://gcc.gnu.org/g:c1c17a43e172ebc28f2cd247f6e83c5fdbc6219f

commit r12-6386-gc1c17a43e172ebc28f2cd247f6e83c5fdbc6219f
Author: Mikael Morin 
Date:   Fri Jan 7 22:34:59 2022 +0100

Fortran: Ignore KIND argument of a few more intrinsics. [PR103789]

After PR97896 for which some code was added to ignore the KIND argument
of the INDEX intrinsics, and PR87711 for which that was extended to
LEN_TRIM
as well, this propagates it further to MASKL, MASKR, SCAN and VERIFY.

PR fortran/103789

gcc/fortran/ChangeLog:

* trans-array.c (arg_evaluated_for_scalarization): Add MASKL,
MASKR,
SCAN and VERIFY to the list of intrinsics whose KIND argument is to
be
ignored.

gcc/testsuite/ChangeLog:

* gfortran.dg/maskl_1.f90: New test.
* gfortran.dg/maskr_1.f90: New test.
* gfortran.dg/scan_3.f90: New test.
* gfortran.dg/verify_3.f90: New test.

[Bug fortran/103789] ICE when providing kind argument to mask{l,r}

2021-12-28 Thread anlauf at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103789

anlauf at gcc dot gnu.org changed:

   What|Removed |Added

 CC||anlauf at gcc dot gnu.org

--- Comment #3 from anlauf at gcc dot gnu.org ---
(In reply to Mikael Morin from comment #1)
> maskr is the same.
> 
> Fix probably similar to PR87851.

If you mean:

diff --git a/gcc/fortran/trans-array.c b/gcc/fortran/trans-array.c
index 238b1b72385..f5056af371e 100644
--- a/gcc/fortran/trans-array.c
+++ b/gcc/fortran/trans-array.c
@@ -11500,6 +11500,8 @@ arg_evaluated_for_scalarization (gfc_intrinsic_sym
*function,
{
  case GFC_ISYM_INDEX:
  case GFC_ISYM_LEN_TRIM:
+ case GFC_ISYM_MASKL:
+ case GFC_ISYM_MASKR:
if (strcmp ("kind", gfc_dummy_arg_get_name (*dummy_arg)) == 0)
  return false;
  /* Fallthrough.  */

This works for the testcase in comment#0 and is pre-approved.

[Bug fortran/103789] ICE when providing kind argument to mask{l,r}

2021-12-21 Thread marxin at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103789

Martin Liška  changed:

   What|Removed |Added

   Last reconfirmed||2021-12-21
 CC||marxin at gcc dot gnu.org
 Ever confirmed|0   |1
 Status|UNCONFIRMED |NEW

--- Comment #2 from Martin Liška  ---
Old at least as 4.8.0.

[Bug fortran/103789] ICE when providing kind argument to mask{l,r}

2021-12-21 Thread mikael at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103789

--- Comment #1 from Mikael Morin  ---
maskr is the same.

Fix probably similar to PR87851.