From: Bernhard Reutner-Fischer <[email protected]>
gcc/fortran/ChangeLog:
* resolve.c (resolve_fl_procedure): Initialize
allocatable_or_pointer.
---
fortran/resolve.c: In function 'bool resolve_fl_procedure(gfc_symbol*, int)':
fortran/resolve.c:13391:7: warning: 'allocatable_or_pointer' may be used
uninitialized in this function [-Wmaybe-uninitialized]
13390 | if (sym->attr.elemental && sym->result
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
13391 | && allocatable_or_pointer)
| ^~~~~~~~~~~~~~~~~~~~~~~~~
.../fortran/resolve.c:13197:8: note: 'allocatable_or_pointer' was declared here
13197 | bool allocatable_or_pointer;
| ^~~~~~~~~~~~~~~~~~~~~~
Bootstrapped and regtested without regressions.
Ok for trunk?
---
gcc/fortran/resolve.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gcc/fortran/resolve.c b/gcc/fortran/resolve.c
index 8da396b32ec..21126cba262 100644
--- a/gcc/fortran/resolve.c
+++ b/gcc/fortran/resolve.c
@@ -13179,7 +13179,7 @@ static bool
resolve_fl_procedure (gfc_symbol *sym, int mp_flag)
{
gfc_formal_arglist *arg;
- bool allocatable_or_pointer;
+ bool allocatable_or_pointer = false;
if (sym->attr.function
&& !resolve_fl_var_and_proc (sym, mp_flag))
--
2.33.0