This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
[gfortran,committed] Get rid of -Wuninitialized warnings on front-end artificial variables
- From: FX Coudert <fxcoudert at gmail dot com>
- To: Fortran List <fortran at gcc dot gnu dot org>, gcc-patches list <gcc-patches at gcc dot gnu dot org>
- Date: Sat, 22 Sep 2007 17:58:46 +0100
- Subject: [gfortran,committed] Get rid of -Wuninitialized warnings on front-end artificial variables
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:mime-version:content-transfer-encoding:message-id:content-type:to:from:subject:date:x-mailer; bh=2mTBIx9zVdgkXXqMfPRHFQRIAiseNyTMDs1mLQ1K25o=; b=Gt11gtaQo/ScNboLZTbd5yEbvSuHjqlj+e/mCzpLoBBbj5wf6J7UHwR9I04BZrD8SwMuf4Bxlp3C0UdH/SUpIYf2EYWMcTWIky/a070L2x79/64CqVNMRJThV6RQYir+fmbktfqQzDyheX/IN35CTKQAAmBW7fkup2ARzlG/ihA=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:mime-version:content-transfer-encoding:message-id:content-type:to:from:subject:date:x-mailer; b=p2x2l566zKo1esHFViGf2AgV55Z+l1OmY8OCTxyir5C+Mxh3LZ1itNCX34vFOgmXPMP6Gtxybd76sOaYamuUhSx6EeNs8EERkX6j9OOL9tTAgilgww1mIJmZuUrv9XNzPN/3ysV+hyqGdV2990kG66V/6VqZPdJkvtpdYdJvr/k=
Attached patch is yet another "get rid of spurious -Wuninitialized
warnings" patch, committed as rev. 128673 after regtesting on x86_64-
linux.
FX
Index: ChangeLog
===================================================================
--- ChangeLog (revision 128672)
+++ ChangeLog (working copy)
@@ -1,3 +1,10 @@
+2007-09-22 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
+
+ PR fortran/33522
+ * trans-types.c (gfc_get_desc_dim_type): Mark artificial
+ variables with TREE_NO_WARNING.
+ (gfc_get_array_descriptor_base): Likewise.
+
2007-09-22 Paul Thomas <pault@gcc.gnu.org>
PR fortran/33337
Index: trans-types.c
===================================================================
--- trans-types.c (revision 128672)
+++ trans-types.c (working copy)
@@ -1088,16 +1088,19 @@ gfc_get_desc_dim_type (void)
decl = build_decl (FIELD_DECL,
get_identifier ("stride"), gfc_array_index_type);
DECL_CONTEXT (decl) = type;
+ TREE_NO_WARNING (decl) = 1;
fieldlist = decl;
decl = build_decl (FIELD_DECL,
get_identifier ("lbound"), gfc_array_index_type);
DECL_CONTEXT (decl) = type;
+ TREE_NO_WARNING (decl) = 1;
fieldlist = chainon (fieldlist, decl);
decl = build_decl (FIELD_DECL,
get_identifier ("ubound"), gfc_array_index_type);
DECL_CONTEXT (decl) = type;
+ TREE_NO_WARNING (decl) = 1;
fieldlist = chainon (fieldlist, decl);
/* Finish off the type. */
@@ -1389,12 +1392,14 @@ gfc_get_array_descriptor_base (int dimen
decl = build_decl (FIELD_DECL, get_identifier ("offset"),
gfc_array_index_type);
DECL_CONTEXT (decl) = fat_type;
+ TREE_NO_WARNING (decl) = 1;
fieldlist = chainon (fieldlist, decl);
/* Add the dtype component. */
decl = build_decl (FIELD_DECL, get_identifier ("dtype"),
gfc_array_index_type);
DECL_CONTEXT (decl) = fat_type;
+ TREE_NO_WARNING (decl) = 1;
fieldlist = chainon (fieldlist, decl);
/* Build the array type for the stride and bound components. */
@@ -1406,6 +1411,7 @@ gfc_get_array_descriptor_base (int dimen
decl = build_decl (FIELD_DECL, get_identifier ("dim"), arraytype);
DECL_CONTEXT (decl) = fat_type;
+ TREE_NO_WARNING (decl) = 1;
fieldlist = chainon (fieldlist, decl);
/* Finish off the type. */