aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndre Vehreschild <vehre@gmx.de>2015-01-23 11:01:39 +0100
committerAndre Vehreschild <vehre@gcc.gnu.org>2015-01-23 11:01:39 +0100
commit63a1dd103f90a6c4c26d2f57f64368ba36ed98c1 (patch)
tree9380e138e9ed29aab25304efacd4c68e34556ea7
parentbd849fe605470d9a902dbbd5338012c786243466 (diff)
downloadgcc-63a1dd103f90a6c4c26d2f57f64368ba36ed98c1.zip
gcc-63a1dd103f90a6c4c26d2f57f64368ba36ed98c1.tar.gz
gcc-63a1dd103f90a6c4c26d2f57f64368ba36ed98c1.tar.bz2
In gcc/fortran/ fixed some cosmetics.
* trans-decl.c (gfc_finish_var_decl): Fixed moved comment. * trans-stmt.c (gfc_trans_allocate): Fixed indentation. From-SVN: r220032
-rw-r--r--gcc/fortran/ChangeLog6
-rw-r--r--gcc/fortran/trans-decl.c9
-rw-r--r--gcc/fortran/trans-stmt.c2
3 files changed, 12 insertions, 5 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog
index 6b30eb2..6e17a65 100644
--- a/gcc/fortran/ChangeLog
+++ b/gcc/fortran/ChangeLog
@@ -1,3 +1,9 @@
+
+2015-01-23 Andre Vehreschild <vehre@gmx.de>
+
+ * trans-decl.c (gfc_finish_var_decl): Fixed moved comment.
+ * trans-stmt.c (gfc_trans_allocate): Fixed indentation.
+
2015-01-23 Jakub Jelinek <jakub@redhat.com>
* gfc-diagnostic.def (DK_ICE_NOBT): New kind.
diff --git a/gcc/fortran/trans-decl.c b/gcc/fortran/trans-decl.c
index 5beb6f7..8a65d2b 100644
--- a/gcc/fortran/trans-decl.c
+++ b/gcc/fortran/trans-decl.c
@@ -558,17 +558,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 a9cbe43..52caaa4 100644
--- a/gcc/fortran/trans-stmt.c
+++ b/gcc/fortran/trans-stmt.c
@@ -5150,7 +5150,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,