public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [gfortran,committed] Get rid of -Wuninitialized warnings on front-end artificial variables
@ 2007-09-22 19:20 FX Coudert
  0 siblings, 0 replies; only message in thread
From: FX Coudert @ 2007-09-22 19:20 UTC (permalink / raw)
  To: Fortran List, gcc-patches list

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.  */

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2007-09-22 16:59 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-09-22 19:20 [gfortran,committed] Get rid of -Wuninitialized warnings on front-end artificial variables FX Coudert

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).