aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHarald Anlauf <anlauf@gmx.de>2024-08-11 20:31:13 +0200
committerHarald Anlauf <anlauf@gmx.de>2024-08-11 20:31:13 +0200
commit2b23a444bcf7eb67cb04b431d8fd4fa6f65222de (patch)
tree9fafc17933148448e0a9e01159cd10be9d084f16
parent149a23ee2568ce1efcfb4cb7704ecc97d4c32274 (diff)
downloadgcc-2b23a444bcf7eb67cb04b431d8fd4fa6f65222de.zip
gcc-2b23a444bcf7eb67cb04b431d8fd4fa6f65222de.tar.gz
gcc-2b23a444bcf7eb67cb04b431d8fd4fa6f65222de.tar.bz2
Fortran: silence Wmaybe-uninitialized warnings for LTO build [PR116221]
PR fortran/116221 gcc/fortran/ChangeLog: * intrinsic.cc (gfc_get_intrinsic_sub_symbol): Initialize variable. * symbol.cc (gfc_get_ha_symbol): Likewise.
-rw-r--r--gcc/fortran/intrinsic.cc2
-rw-r--r--gcc/fortran/symbol.cc2
2 files changed, 2 insertions, 2 deletions
diff --git a/gcc/fortran/intrinsic.cc b/gcc/fortran/intrinsic.cc
index 40f4c4f..62c349d 100644
--- a/gcc/fortran/intrinsic.cc
+++ b/gcc/fortran/intrinsic.cc
@@ -131,7 +131,7 @@ gfc_type_abi_kind (bt type, int kind)
gfc_symbol *
gfc_get_intrinsic_sub_symbol (const char *name)
{
- gfc_symbol *sym;
+ gfc_symbol *sym = NULL;
gfc_get_symbol (name, gfc_intrinsic_namespace, &sym);
sym->attr.always_explicit = 1;
diff --git a/gcc/fortran/symbol.cc b/gcc/fortran/symbol.cc
index b5143d9..a8b623d 100644
--- a/gcc/fortran/symbol.cc
+++ b/gcc/fortran/symbol.cc
@@ -3599,7 +3599,7 @@ int
gfc_get_ha_symbol (const char *name, gfc_symbol **result)
{
int i;
- gfc_symtree *st;
+ gfc_symtree *st = NULL;
i = gfc_get_ha_sym_tree (name, &st);