]> gcc.gnu.org Git - gcc.git/commitdiff
re PR fortran/20467 (Bad fortran code causes ICE)
authorTobias Schlüter <tobias.schlueter@physik.uni-muenchen.de>
Mon, 14 Mar 2005 19:55:02 +0000 (20:55 +0100)
committerTobias Schlüter <tobi@gcc.gnu.org>
Mon, 14 Mar 2005 19:55:02 +0000 (20:55 +0100)
fortran/
PR fortran/20467
* symbol.c (check_conflict): A dummy argument can't be a statement
function.

testsuite/
PR fortran/20467
* gfortran.dg/stfunc_2.f90: New test.

From-SVN: r96443

gcc/fortran/ChangeLog
gcc/fortran/symbol.c
gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/stfunc_2.f90 [new file with mode: 0644]

index 63172cb573b452a174bb4b89835824c19cb15608..819442c593fa225186977cf73fb62f96aa47cb3b 100644 (file)
@@ -1,3 +1,9 @@
+2005-03-14  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
+
+       PR fortran/20467
+       * symbol.c (check_conflict): A dummy argument can't be a statement
+       function.
+
 2005-03-14  Zdenek Dvorak  <dvorakz@suse.cz>
 
        * fortran/trans-intrinsic.c (gfc_conv_intrinsic_ishft): Convert
index 0b5e8e727a44d5c713c8385df7df4e443a142e19..26e3f003442b0961d2b877e496fa695d1a9dc82d 100644 (file)
@@ -369,6 +369,7 @@ check_conflict (symbol_attribute * attr, const char * name, locus * where)
        {
        case PROC_ST_FUNCTION:
          conf2 (in_common);
+         conf2 (dummy);
          break;
 
        case PROC_MODULE:
index 8ed2b48f36586a0722dca36e07439d8cd40142f3..ef6463180c696b1295c6a59551cac25dffdc672d 100644 (file)
@@ -1,3 +1,8 @@
+2005-03-14  Tobias Schl"uter  <tobias.schlueter@physik.uni-muenchen.de>
+
+       PR fortran/20467
+       * gfortran.dg/stfunc_2.f90: New test.
+
 2005-03-14  Zdenek Dvorak  <dvorakz@suse.cz>
 
        * gcc.dg/tree-ssa/phi-opt-5.c: New test.
diff --git a/gcc/testsuite/gfortran.dg/stfunc_2.f90 b/gcc/testsuite/gfortran.dg/stfunc_2.f90
new file mode 100644 (file)
index 0000000..75ecb05
--- /dev/null
@@ -0,0 +1,6 @@
+! { dg-do compile }
+! PR 20467 : we didn't check if a statement function had the dummy attribute.
+SUBROUTINE a(b)
+        b(c) = 0  ! { dg-error "Unclassifiable statement" }
+END SUBROUTINE a
+
This page took 0.123742 seconds and 5 git commands to generate.