public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r11-3301] Work around bootstrap failure in Fortran front end.
@ 2020-09-19 22:27 Sandra Loosemore
0 siblings, 0 replies; only message in thread
From: Sandra Loosemore @ 2020-09-19 22:27 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:a85e5696a31cac8c14dde14f031e76480205f8a0
commit r11-3301-ga85e5696a31cac8c14dde14f031e76480205f8a0
Author: Sandra Loosemore <sandra@codesourcery.com>
Date: Sat Sep 19 07:32:35 2020 -0700
Work around bootstrap failure in Fortran front end.
Switching the C++ front end to lower loops the same was as the C front
end triggered this error when bootstrapping the Fortran front end:
/path/to/gcc/fortran/interface.c:3546:12: error: '*new_arg' may be used uninitialized [-Werror=maybe-uninitialized]
3546 | new_arg[i]->next = NULL;
| ~~~~~~~~~^
Work around this by adding an assertion, which seems appropriate for
documentation and good coding practices anyway.
2020-08-12 Sandra Loosemore <sandra@codesourcery.com>
gcc/fortran/
* interface.c (gfc_compare_actual_formal): Add assertion after
main processing loop to silence maybe-uninitialized error.
Diff:
---
gcc/fortran/interface.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/gcc/fortran/interface.c b/gcc/fortran/interface.c
index 020cdd73df8..e2cc76f0024 100644
--- a/gcc/fortran/interface.c
+++ b/gcc/fortran/interface.c
@@ -3530,6 +3530,10 @@ gfc_compare_actual_formal (gfc_actual_arglist **ap, gfc_formal_arglist *formal,
}
}
+ /* We should have handled the cases where the formal arglist is null
+ already. */
+ gcc_assert (n > 0);
+
/* The argument lists are compatible. We now relink a new actual
argument list with null arguments in the right places. The head
of the list remains the head. */
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2020-09-19 22:27 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-19 22:27 [gcc r11-3301] Work around bootstrap failure in Fortran front end Sandra Loosemore
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).