diff options
author | Andre Vehreschild <vehre@gcc.gnu.org> | 2017-02-05 14:05:10 +0100 |
---|---|---|
committer | Andre Vehreschild <vehre@gcc.gnu.org> | 2017-02-05 14:05:10 +0100 |
commit | ea06c7b0c4299833959a6a62a7a57533e60c8418 (patch) | |
tree | ed17d1622f71b5d596c4ede358976f9679901f80 /gcc | |
parent | 764d5c7b5376677bd6e592fa969065f58dc3d816 (diff) | |
download | gcc-ea06c7b0c4299833959a6a62a7a57533e60c8418.zip gcc-ea06c7b0c4299833959a6a62a7a57533e60c8418.tar.gz gcc-ea06c7b0c4299833959a6a62a7a57533e60c8418.tar.bz2 |
re PR fortran/79335 (Conditional jump or move depends on uninitialised in value get_scalar_to_descriptor_type(tree_node*, symbol_attribute) (trans-expr.c:53))
gcc/fortran/ChangeLog:
2017-02-05 Andre Vehreschild <vehre@gcc.gnu.org>
PR fortran/79335
* trans-decl.c (generate_coarray_sym_init): Retrieve the symbol's
attributes before using them.
From-SVN: r245193
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/fortran/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/fortran/trans-decl.c | 10 |
2 files changed, 16 insertions, 0 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index 601017d..222e91f 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,5 +1,11 @@ 2017-02-05 Andre Vehreschild <vehre@gcc.gnu.org> + PR fortran/79335 + * trans-decl.c (generate_coarray_sym_init): Retrieve the symbol's + attributes before using them. + +2017-02-05 Andre Vehreschild <vehre@gcc.gnu.org> + PR fortran/78958 * trans-stmt.c (gfc_trans_allocate): Add the multiplying the _len component of unlimited polymorphic objects when source-allocating. diff --git a/gcc/fortran/trans-decl.c b/gcc/fortran/trans-decl.c index 3e54e80..41b36a5 100644 --- a/gcc/fortran/trans-decl.c +++ b/gcc/fortran/trans-decl.c @@ -5128,6 +5128,16 @@ generate_coarray_sym_init (gfc_symbol *sym) else reg_type = GFC_CAF_COARRAY_STATIC; + /* Compile the symbol attribute. */ + if (sym->ts.type == BT_CLASS) + { + attr = CLASS_DATA (sym)->attr; + /* The pointer attribute is always set on classes, overwrite it with the + class_pointer attribute, which denotes the pointer for classes. */ + attr.pointer = attr.class_pointer; + } + else + attr = sym->attr; gfc_init_se (&se, NULL); desc = gfc_conv_scalar_to_descriptor (&se, decl, attr); gfc_add_block_to_block (&caf_init_block, &se.pre); |