diff mbox series

[Committed] PR fortran/80768 -- testcase

Message ID 20180119233130.GA81860@troutmask.apl.washington.edu
State New
Headers show
Series [Committed] PR fortran/80768 -- testcase | expand

Commit Message

Steve Kargl Jan. 19, 2018, 11:31 p.m. UTC
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  <kargl@gcc.gnu.org>

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

Patch

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