Patchwork [Fortran,committed] Another C++ism + Fortran-dev update

login
register
mail settings
Submitter Tobias Burnus
Date July 21, 2012, 10:10 a.m.
Message ID <500A801C.90209@net-b.de>
Download mbox | patch
Permalink /patch/172417/
State New
Headers show

Comments

Tobias Burnus - July 21, 2012, 10:10 a.m.
I build the Fortran-dev branch with C, and it failed because of the 
previous Boolean issue, but also because decl-ordering issue, addressed 
by the attachment. I initially thought that the latter is a merge issue, 
but as it isn't, I have now fixed it first on the trunk – and then 
backported the fix to the Fortran-dev branch.

Trunk commit: Rev. 189740.
Fortran-branch: Rev. 189741.

Tobias

Patch

Index: gcc/fortran/resolve.c
===================================================================
--- gcc/fortran/resolve.c	(Revision 189738)
+++ gcc/fortran/resolve.c	(Arbeitskopie)
@@ -257,9 +257,10 @@  resolve_formal_arglist (gfc_symbol *proc)
 
   for (f = proc->formal; f; f = f->next)
     {
-      sym = f->sym;
       gfc_array_spec *as;
 
+      sym = f->sym;
+
       if (sym == NULL)
 	{
 	  /* Alternate return placeholder.  */
Index: gcc/fortran/ChangeLog
===================================================================
--- gcc/fortran/ChangeLog	(Revision 189739)
+++ gcc/fortran/ChangeLog	(Arbeitskopie)
@@ -1,5 +1,10 @@ 
 2012-07-21  Tobias Burnus  <burnus@net-b.de>
 
+	* resolve.c (resolve_formal_arglist): Put variable
+	declaration before the first assignment.
+
+2012-07-21  Tobias Burnus  <burnus@net-b.de>
+
 	* trans-expr.c (gfc_conv_derived_to_class): Fix argument passed
 	to class_array_data_assign.