Jakub fixed a typo in

-----------------------------------------------------------------------
r250734 | jakub | 2017-07-31 02:32:02 -0700 (Mon, 31 Jul 2017) | 2 lines

        * check.c (gfc_check_num_images): Fix a pasto.

but he seemed to be unaware of PR fortran/80768.  I've converted
to code form the PR into a testcase.  I plan to fix the typo
in the 6 and 7-branch as it prevents an ICE.

2018-01-19  Steven G. Kargl  <ka...@gcc.gnu.org>

        PR fortran/80768
        * gfortran.dg/num_images_1.f90:  New test that tests fix in r250734.

Index: gcc/testsuite/gfortran.dg/num_images_1.f90
===================================================================
--- gcc/testsuite/gfortran.dg/num_images_1.f90  (nonexistent)
+++ gcc/testsuite/gfortran.dg/num_images_1.f90  (working copy)
@@ -0,0 +1,9 @@
+! { dg-do compile }
+! { dg-options "-fcoarray=single -std=f2008" }
+! PR  Fortran/80768
+! Reported by Vittorio Zecca.
+program foo
+   implicit none
+   integer k5
+   k5 = num_images(failed=.false.) ! { dg-error "argument to NUM_IMAGES" }
+end program foo

-- 
Steve

Reply via email to