]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
trans-decl.c (add_argument_checking): Check ts.deferred earlier.
authorTobias Burnus <burnus@net-b.de>
Sat, 10 Dec 2011 20:13:59 +0000 (21:13 +0100)
committerTobias Burnus <burnus@gcc.gnu.org>
Sat, 10 Dec 2011 20:13:59 +0000 (21:13 +0100)
2011-12-10  Tobias Burnus  <burnus@net-b.de>
            Kai Tietz  <ktietz@redhat.com>

        * trans-decl.c (add_argument_checking): Check ts.deferred earlier.
        * trans-intrinsic.c (gfc_conv_intrinsic_repeat): Use %ld with long.

Co-Authored-By: Kai Tietz <ktietz@redhat.com>
From-SVN: r182190

gcc/fortran/ChangeLog
gcc/fortran/trans-decl.c
gcc/fortran/trans-intrinsic.c

index abaa344c12eda7c6a43cb82266ef6abce5818f35..b7df50611cfa26642cd4bc61c7cfa588babecdfe 100644 (file)
@@ -1,3 +1,9 @@
+2011-12-10  Tobias Burnus  <burnus@net-b.de>
+           Kai Tietz  <ktietz@redhat.com>
+
+       * trans-decl.c (add_argument_checking): Check ts.deferred earlier.
+       * trans-intrinsic.c (gfc_conv_intrinsic_repeat): Use %ld with long.
+
 2011-12-08  Tobias Burnus  <burnus@net-b.de>
 
        PR fortran/50815
index 50b64740b99e644e7c60eaf51932b5f9bc5d821a..4ea4e7adfdb44c0c041fee8dbe5d0605ffa65767 100644 (file)
@@ -4672,7 +4672,8 @@ add_argument_checking (stmtblock_t *block, gfc_symbol *sym)
   gfc_formal_arglist *formal;
 
   for (formal = sym->formal; formal; formal = formal->next)
-    if (formal->sym && formal->sym->ts.type == BT_CHARACTER)
+    if (formal->sym && formal->sym->ts.type == BT_CHARACTER
+       && !fsym->ts.deferred)
       {
        enum tree_code comparison;
        tree cond;
@@ -4695,10 +4696,8 @@ add_argument_checking (stmtblock_t *block, gfc_symbol *sym)
           if the actual argument is (part of) an array, but only if the
           dummy argument is an array. (See "Sequence association" in
           Section 12.4.1.4 for F95 and 12.4.1.5 for F2003.)  */
-       if (fsym->ts.deferred)
-         continue;
-       else if (fsym->attr.pointer || fsym->attr.allocatable
-                || (fsym->as && fsym->as->type == AS_ASSUMED_SHAPE))
+       if (fsym->attr.pointer || fsym->attr.allocatable
+           || (fsym->as && fsym->as->type == AS_ASSUMED_SHAPE))
          {
            comparison = NE_EXPR;
            message = _("Actual string length does not match the declared one"
index 855db306a7af3a243fefbbd896a2eea88db5fb4f..d8e1783e7b16d4202d8d6638db50bb3520a8dd38 100644 (file)
@@ -6015,7 +6015,7 @@ gfc_conv_intrinsic_repeat (gfc_se * se, gfc_expr * expr)
                          build_int_cst (ncopies_type, 0));
   gfc_trans_runtime_check (true, false, cond, &se->pre, &expr->where,
                           "Argument NCOPIES of REPEAT intrinsic is negative "
-                          "(its value is %lld)",
+                          "(its value is %ld)",
                           fold_convert (long_integer_type_node, ncopies));
 
   /* If the source length is zero, any non negative value of NCOPIES