aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran
diff options
context:
space:
mode:
authorFrancois-Xavier Coudert <fxcoudert@gcc.gnu.org>2007-09-22 16:54:56 +0000
committerFrançois-Xavier Coudert <fxcoudert@gcc.gnu.org>2007-09-22 16:54:56 +0000
commitd8eff1b8e4ca36200a7f01c233317dad63888727 (patch)
tree89b6748a921c8cd0bac21d8a8990f15a215bca6a /gcc/fortran
parentfdc55763b63d833dccd47781ff5d4b09dd96c1c1 (diff)
downloadgcc-d8eff1b8e4ca36200a7f01c233317dad63888727.zip
gcc-d8eff1b8e4ca36200a7f01c233317dad63888727.tar.gz
gcc-d8eff1b8e4ca36200a7f01c233317dad63888727.tar.bz2
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
Diffstat (limited to 'gcc/fortran')
-rw-r--r--gcc/fortran/ChangeLog7
-rw-r--r--gcc/fortran/trans-types.c6
2 files changed, 13 insertions, 0 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog
index cb8f7cc..3c85cdd 100644
--- a/gcc/fortran/ChangeLog
+++ b/gcc/fortran/ChangeLog
@@ -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
diff --git a/gcc/fortran/trans-types.c b/gcc/fortran/trans-types.c
index cfdd399..e836861 100644
--- a/gcc/fortran/trans-types.c
+++ b/gcc/fortran/trans-types.c
@@ -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. */