diff mbox

[Fortran] Cosmetics

Message ID 20141228150439.0af8d95d@gmx.de
State New
Headers show

Commit Message

Andre Vehreschild Dec. 28, 2014, 2:04 p.m. UTC
Hi all,

during gfortran hacking I found a displaced comment and an indentation mistake.
Just to make sure those don't get mangled in my other patches, I submit them
here.

- Andre

gcc/fortran/ChangeLog:

2014-12-28  Andre Vehreschild  <vehre@gmx.de>

	* trans-decl.c (gfc_finish_var_decl): Fixed displaced comment.
	* trans-stmt.c (gfc_trans_allocate): Fixed indentation.

Comments

FX Coudert Dec. 28, 2014, 4:17 p.m. UTC | #1
> 2014-12-28  Andre Vehreschild  <vehre@gmx.de>
> 
>    * trans-decl.c (gfc_finish_var_decl): Fixed displaced comment.
>    * trans-stmt.c (gfc_trans_allocate): Fixed indentation.

OK to commit. Thanks!

FX
Andre Vehreschild Jan. 13, 2015, 1:04 p.m. UTC | #2
Hi,

is this patch commited now? I don't have the rights to do so myself.

- Andre

On Sun, 28 Dec 2014 17:17:50 +0100
FX <fxcoudert@gmail.com> wrote:

> 
> > 2014-12-28  Andre Vehreschild  <vehre@gmx.de>
> > 
> >    * trans-decl.c (gfc_finish_var_decl): Fixed displaced comment.
> >    * trans-stmt.c (gfc_trans_allocate): Fixed indentation.
> 
> OK to commit. Thanks!
> 
> FX
diff mbox

Patch

diff --git a/gcc/fortran/trans-decl.c b/gcc/fortran/trans-decl.c
index 494d8aa..04568c8 100644
--- a/gcc/fortran/trans-decl.c
+++ b/gcc/fortran/trans-decl.c
@@ -550,17 +550,18 @@  static void
 gfc_finish_var_decl (tree decl, gfc_symbol * sym)
 {
   tree new_type;
-  /* TREE_ADDRESSABLE means the address of this variable is actually needed.
-     This is the equivalent of the TARGET variables.
-     We also need to set this if the variable is passed by reference in a
-     CALL statement.  */
 
   /* Set DECL_VALUE_EXPR for Cray Pointees.  */
   if (sym->attr.cray_pointee)
     gfc_finish_cray_pointee (decl, sym);
 
+  /* TREE_ADDRESSABLE means the address of this variable is actually needed.
+     This is the equivalent of the TARGET variables.
+     We also need to set this if the variable is passed by reference in a
+     CALL statement.  */
   if (sym->attr.target)
     TREE_ADDRESSABLE (decl) = 1;
+
   /* If it wasn't used we wouldn't be getting it.  */
   TREE_USED (decl) = 1;
 
diff --git a/gcc/fortran/trans-stmt.c b/gcc/fortran/trans-stmt.c
index 47edd32..24e47f2 100644
--- a/gcc/fortran/trans-stmt.c
+++ b/gcc/fortran/trans-stmt.c
@@ -5055,7 +5055,7 @@  gfc_trans_allocate (gfc_code * code)
 	      if (unlimited_char)
 		tmp = TREE_TYPE (gfc_typenode_for_spec (&code->expr3->ts));
 	      else
-	      tmp = TREE_TYPE (gfc_typenode_for_spec (&al->expr->ts));
+		tmp = TREE_TYPE (gfc_typenode_for_spec (&al->expr->ts));
 	      tmp = TYPE_SIZE_UNIT (tmp);
 	      memsz = fold_build2_loc (input_location, MULT_EXPR,
 				       TREE_TYPE (tmp), tmp,