summaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc')
-rw-r--r--gcc/fortran/ChangeLog5
-rw-r--r--gcc/fortran/resolve.c3
2 files changed, 7 insertions, 1 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog
index 04725e0a6d9..7be7bdb626c 100644
--- a/gcc/fortran/ChangeLog
+++ b/gcc/fortran/ChangeLog
@@ -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.
diff --git a/gcc/fortran/resolve.c b/gcc/fortran/resolve.c
index 7e2d6217adc..370e5cd8d36 100644
--- a/gcc/fortran/resolve.c
+++ b/gcc/fortran/resolve.c
@@ -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. */