Fortran: Fix handling of optional argument to SIZE intrinsic [PR103898]
authorSandra Loosemore <sandra@codesourcery.com>
Thu, 6 Jan 2022 19:23:18 +0000 (11:23 -0800)
committerSandra Loosemore <sandra@codesourcery.com>
Fri, 7 Jan 2022 01:34:35 +0000 (17:34 -0800)
commit55385f12f604fe242030f0a8fb057598c0f187a6
tree1c067ab8b44eb18982ae18616df52a822cf23720
parent32d8ff73718fd07a9a7dfd2566d3b7b69f37b6bd
Fortran: Fix handling of optional argument to SIZE intrinsic [PR103898]

This patch fixes a think-o in the code that triggered an ICE
in the test case.

2021-01-06  Sandra Loosemore  <sandra@codesourcery.com>

PR fortran/103898

gcc/fortran/
* trans-intrinsic.c (gfc_conv_intrinsic_size): Make size_var
actually be a variable and fix surrounding code.

gcc/testsuite/
* gfortran.dg/pr103898.f90: New test.
gcc/fortran/trans-intrinsic.c
gcc/testsuite/gfortran.dg/pr103898.f90 [new file with mode: 0644]