re PR fortran/70330 (ICE with -Wextra -Wno-unused-dummy-argument and unused optional...
authorThomas Koenig <tkoenig@gcc.gnu.org>
Sat, 4 Nov 2017 13:54:27 +0000 (13:54 +0000)
committerThomas Koenig <tkoenig@gcc.gnu.org>
Sat, 4 Nov 2017 13:54:27 +0000 (13:54 +0000)
2017-11-04  Thomas Koenig  <tkoenig@gcc.gnu.org>

PR fortran/70330
* gfortran.dg/pr70330.f90: New test.

From-SVN: r254406

gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/pr70330.f90 [new file with mode: 0644]

index 3997311bdd4d312cc8175fb3bdd94ea8285bc627..7ef59a71f2201f6df60d50fdab80351b11628ae3 100644 (file)
@@ -1,3 +1,8 @@
+2017-11-04  Thomas Koenig  <tkoenig@gcc.gnu.org>
+
+       PR fortran/70330
+       * gfortran.dg/pr70330.f90: New test.
+
 2017-11-04  Thomas Koenig  <tkoenig@gcc.gnu.org>
 
        PR fortran/29600
diff --git a/gcc/testsuite/gfortran.dg/pr70330.f90 b/gcc/testsuite/gfortran.dg/pr70330.f90
new file mode 100644 (file)
index 0000000..29f5f7b
--- /dev/null
@@ -0,0 +1,7 @@
+! { dg-do compile }
+! { dg-additional-options "-Wall -Wextra -Wno-unused-dummy-argument" }
+! PR fortran/70330 - this used to cause an ICE.
+! Test case by Vladimir Fuka
+function f(o) ! { dg-warning "Return value of function" }
+  optional o
+end function f