diff mbox

[4.8,Fortran] PR 48820 - Support TYPE(*) of TS29113

Message ID 4F52694B.1040109@net-b.de
State New
Headers show

Commit Message

Tobias Burnus March 3, 2012, 6:56 p.m. UTC
Tobias Burnus wrote:
> _3.f90: [...]
> "fourteen" is really odd: Depending on the position of that subroutine 
> in file, I get an error or not. I think one should try to better 
> understand why that happens.

I found it with the help of Paul. The problem was that I set instead of 
re-set the variable at the end of resolve_actual_arglist. Now, it works.

Committed the attached patch as Rev. 184863 after a fresh rebuild and 
regtesting.

Tobias

PS: Sorry for the glitches.
diff mbox

Patch

Index: gcc/fortran/resolve.c
===================================================================
--- gcc/fortran/resolve.c	(Revision 184861)
+++ gcc/fortran/resolve.c	(Arbeitskopie)
@@ -1833,7 +1833,7 @@  resolve_actual_arglist (gfc_actual_arglist *arg, p
           return FAILURE;
         }
     }
-  assumed_type_expr_allowed = true;
+  assumed_type_expr_allowed = false;
 
   return SUCCESS;
 }
Index: gcc/fortran/ChangeLog
===================================================================
--- gcc/fortran/ChangeLog	(Revision 184861)
+++ gcc/fortran/ChangeLog	(Arbeitskopie)
@@ -1,5 +1,11 @@ 
 2012-03-03  Tobias Burnus  <burnus@net-b.de>
 
+	PR fortran/48820
+	* resolve.c (resolve_actual_arglist): Properly reset
+	assumed_type_expr_allowed.
+
+2012-03-03  Tobias Burnus  <burnus@net-b.de>
+
 	* lang.opt (Wc-binding-type): New flag.
 	* options.c (gfc_init_options, gfc_handle_option): Handle it.
 	* invoke.texi (Wc-binding-type): Document it.
Index: gcc/testsuite/ChangeLog
===================================================================
--- gcc/testsuite/ChangeLog	(Revision 184861)
+++ gcc/testsuite/ChangeLog	(Arbeitskopie)
@@ -1,5 +1,10 @@ 
 2012-03-03  Tobias Burnus  <burnus@net-b.de>
 
+	PR fortran/48820
+	* gfortran.dg/assumed_type_3.f90: Undo previous commit.
+
+2012-03-03  Tobias Burnus  <burnus@net-b.de>
+
 	* gfortran.dg/bind_c_dts_4.f03: Add dg-options -Wc-binding-type.
 	* gfortran.dg/bind_c_implicit_vars.f03: Ditto.
 	* gfortran.dg/bind_c_usage_8.f03: Ditto.
Index: gcc/testsuite/gfortran.dg/assumed_type_3.f90
===================================================================
--- gcc/testsuite/gfortran.dg/assumed_type_3.f90	(Revision 184861)
+++ gcc/testsuite/gfortran.dg/assumed_type_3.f90	(Arbeitskopie)
@@ -5,11 +5,6 @@ 
 !
 ! Test TYPE(*)
 
-subroutine fourteen(x)
-  type(*) :: x
-  x = x ! { dg-error "Invalid expression with assumed-type variable" }
-end subroutine fourteen
-
 subroutine one(a) ! { dg-error "may not have the ALLOCATABLE, CODIMENSION, POINTER or VALUE attribute" }
   type(*), value :: a
 end subroutine one
@@ -118,4 +113,7 @@  subroutine thirteen(x, y)
   print *, ubound(y, dim=x) ! { dg-error "must be INTEGER" }
 end subroutine thirteen
 
-
+subroutine fourteen(x)
+  type(*) :: x
+  x = x ! { dg-error "Invalid expression with assumed-type variable" }
+end subroutine fourteen