Commit d8eff1b8 by Francois-Xavier Coudert Committed by François-Xavier Coudert

re PR fortran/33522 (Incorrect warning messages about uninitialized variables)

	PR fortran/33522
	* trans-types.c (gfc_get_desc_dim_type): Mark artificial
	variables with TREE_NO_WARNING.
	(gfc_get_array_descriptor_base): Likewise.

From-SVN: r128673
parent fdc55763
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> 2007-09-22 Paul Thomas <pault@gcc.gnu.org>
PR fortran/33337 PR fortran/33337
......
...@@ -1088,16 +1088,19 @@ gfc_get_desc_dim_type (void) ...@@ -1088,16 +1088,19 @@ gfc_get_desc_dim_type (void)
decl = build_decl (FIELD_DECL, decl = build_decl (FIELD_DECL,
get_identifier ("stride"), gfc_array_index_type); get_identifier ("stride"), gfc_array_index_type);
DECL_CONTEXT (decl) = type; DECL_CONTEXT (decl) = type;
TREE_NO_WARNING (decl) = 1;
fieldlist = decl; fieldlist = decl;
decl = build_decl (FIELD_DECL, decl = build_decl (FIELD_DECL,
get_identifier ("lbound"), gfc_array_index_type); get_identifier ("lbound"), gfc_array_index_type);
DECL_CONTEXT (decl) = type; DECL_CONTEXT (decl) = type;
TREE_NO_WARNING (decl) = 1;
fieldlist = chainon (fieldlist, decl); fieldlist = chainon (fieldlist, decl);
decl = build_decl (FIELD_DECL, decl = build_decl (FIELD_DECL,
get_identifier ("ubound"), gfc_array_index_type); get_identifier ("ubound"), gfc_array_index_type);
DECL_CONTEXT (decl) = type; DECL_CONTEXT (decl) = type;
TREE_NO_WARNING (decl) = 1;
fieldlist = chainon (fieldlist, decl); fieldlist = chainon (fieldlist, decl);
/* Finish off the type. */ /* Finish off the type. */
...@@ -1389,12 +1392,14 @@ gfc_get_array_descriptor_base (int dimen) ...@@ -1389,12 +1392,14 @@ gfc_get_array_descriptor_base (int dimen)
decl = build_decl (FIELD_DECL, get_identifier ("offset"), decl = build_decl (FIELD_DECL, get_identifier ("offset"),
gfc_array_index_type); gfc_array_index_type);
DECL_CONTEXT (decl) = fat_type; DECL_CONTEXT (decl) = fat_type;
TREE_NO_WARNING (decl) = 1;
fieldlist = chainon (fieldlist, decl); fieldlist = chainon (fieldlist, decl);
/* Add the dtype component. */ /* Add the dtype component. */
decl = build_decl (FIELD_DECL, get_identifier ("dtype"), decl = build_decl (FIELD_DECL, get_identifier ("dtype"),
gfc_array_index_type); gfc_array_index_type);
DECL_CONTEXT (decl) = fat_type; DECL_CONTEXT (decl) = fat_type;
TREE_NO_WARNING (decl) = 1;
fieldlist = chainon (fieldlist, decl); fieldlist = chainon (fieldlist, decl);
/* Build the array type for the stride and bound components. */ /* Build the array type for the stride and bound components. */
...@@ -1406,6 +1411,7 @@ gfc_get_array_descriptor_base (int dimen) ...@@ -1406,6 +1411,7 @@ gfc_get_array_descriptor_base (int dimen)
decl = build_decl (FIELD_DECL, get_identifier ("dim"), arraytype); decl = build_decl (FIELD_DECL, get_identifier ("dim"), arraytype);
DECL_CONTEXT (decl) = fat_type; DECL_CONTEXT (decl) = fat_type;
TREE_NO_WARNING (decl) = 1;
fieldlist = chainon (fieldlist, decl); fieldlist = chainon (fieldlist, decl);
/* Finish off the type. */ /* Finish off the type. */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment