]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
fortran: Fix bootstrap in resolve.cc [PR116387]
authorJakub Jelinek <jakub@redhat.com>
Thu, 15 Aug 2024 20:50:07 +0000 (22:50 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Thu, 15 Aug 2024 20:50:07 +0000 (22:50 +0200)
The r15-2934 change broke bootstrap:
../../gcc/fortran/resolve.cc: In function ‘bool resolve_operator(gfc_expr*)’:
../../gcc/fortran/resolve.cc:4649:22: error: too many arguments for format [-Werror=format-extra-args]
 4649 |           gfc_error ("Inconsistent coranks for operator at %%L and %%L",
      |                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

The following patch fixes that by using %L rather than %%L, the call has 2
location arguments.

2024-08-15  Jakub Jelinek  <jakub@redhat.com>

PR bootstrap/116387
* resolve.cc (resolve_operator): Use %L rather than %%L in format
string.

gcc/fortran/resolve.cc

index 71312e0e415d4ae94ef26d03e2a3820c2687e655..12973c6bc8560ed70fe234299a2589733c59e4dd 100644 (file)
@@ -4646,7 +4646,7 @@ resolve_operator (gfc_expr *e)
        }
       else
        {
-         gfc_error ("Inconsistent coranks for operator at %%L and %%L",
+         gfc_error ("Inconsistent coranks for operator at %L and %L",
                     &op1->where, &op2->where);
          return false;
        }