Re: [PATCH, Fortran, pr79335, v1] [7 Regression] Conditional jump or move depends on uninitialised in value get_scalar_to_descriptor_type(tree_node*, symbol_attribute) (trans-expr.c:53)
Hi Paul, and the last one committed as r245193. Thanks again for the reviews. Regards, Andre On Sat, 4 Feb 2017 17:16:56 + Paul Richard Thomaswrote: > Hi Andre, > > This is getting to be a bit monotonous :-) OK for trunk. > > Thanks for the three patches. > > Paul > > PS Are you in a position to have a stab at PR79344? This would go a > long way to sorting out Juergen's test suite. Also, this must be the > third time that I have been involved in breaking iso_varying_string > and I think that others have too :-( We must start running the > testsuite on a regular basis. Unfortunately, it lacks a harness to run > all the tests automatically. > > PPS I am some days away yet from recovering from my move from France > to the UK and so would defer to you if you can come up with a fix. > > On 4 February 2017 at 13:39, Andre Vehreschild wrote: > > Hi all, > > > > attached patch fixes the access of uninitialized data. Thanks Martin for > > analyzing this so far. The symbol_attributes on the stack was used > > without initializing it from the symbol's attributes. > > > > Bootstraps and regstests ok on x86_64-linux-gnu/f25. Ok for trunk? > > > > Regards, > > Andre > > -- > > Andre Vehreschild * Email: vehre ad gmx dot de > > > -- Andre Vehreschild * Email: vehre ad gmx dot de Index: gcc/fortran/ChangeLog === --- gcc/fortran/ChangeLog (Revision 245192) +++ gcc/fortran/ChangeLog (Arbeitskopie) @@ -1,5 +1,11 @@ 2017-02-05 Andre Vehreschild + PR fortran/79335 + * trans-decl.c (generate_coarray_sym_init): Retrieve the symbol's + attributes before using them. + +2017-02-05 Andre Vehreschild + PR fortran/78958 * trans-stmt.c (gfc_trans_allocate): Add the multiplying the _len component of unlimited polymorphic objects when source-allocating. Index: gcc/fortran/trans-decl.c === --- gcc/fortran/trans-decl.c (Revision 245191) +++ gcc/fortran/trans-decl.c (Arbeitskopie) @@ -5128,6 +5128,16 @@ 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 (, NULL); desc = gfc_conv_scalar_to_descriptor (, decl, attr); gfc_add_block_to_block (_init_block, );
Re: [PATCH, Fortran, pr79335, v1] [7 Regression] Conditional jump or move depends on uninitialised in value get_scalar_to_descriptor_type(tree_node*, symbol_attribute) (trans-expr.c:53)
Hi Paul, > PS Are you in a position to have a stab at PR79344? This would go a > long way to sorting out Juergen's test suite. Also, this must be the > third time that I have been involved in breaking iso_varying_string > and I think that others have too :-( We must start running the > testsuite on a regular basis. Unfortunately, it lacks a harness to run > all the tests automatically. Currently executing the testsuite with a patched compiler. > PPS I am some days away yet from recovering from my move from France > to the UK and so would defer to you if you can come up with a fix. Fix present, waiting for testsuite to pass. - Andre > > On 4 February 2017 at 13:39, Andre Vehreschildwrote: > > Hi all, > > > > attached patch fixes the access of uninitialized data. Thanks Martin for > > analyzing this so far. The symbol_attributes on the stack was used > > without initializing it from the symbol's attributes. > > > > Bootstraps and regstests ok on x86_64-linux-gnu/f25. Ok for trunk? > > > > Regards, > > Andre > > -- > > Andre Vehreschild * Email: vehre ad gmx dot de > > > -- Andre Vehreschild * Kreuzherrenstr. 8 * 52062 Aachen Tel.: +49 241 9291018 * Email: ve...@gmx.de
Re: [PATCH, Fortran, pr79335, v1] [7 Regression] Conditional jump or move depends on uninitialised in value get_scalar_to_descriptor_type(tree_node*, symbol_attribute) (trans-expr.c:53)
Hi Andre, This is getting to be a bit monotonous :-) OK for trunk. Thanks for the three patches. Paul PS Are you in a position to have a stab at PR79344? This would go a long way to sorting out Juergen's test suite. Also, this must be the third time that I have been involved in breaking iso_varying_string and I think that others have too :-( We must start running the testsuite on a regular basis. Unfortunately, it lacks a harness to run all the tests automatically. PPS I am some days away yet from recovering from my move from France to the UK and so would defer to you if you can come up with a fix. On 4 February 2017 at 13:39, Andre Vehreschildwrote: > Hi all, > > attached patch fixes the access of uninitialized data. Thanks Martin for > analyzing this so far. The symbol_attributes on the stack was used > without initializing it from the symbol's attributes. > > Bootstraps and regstests ok on x86_64-linux-gnu/f25. Ok for trunk? > > Regards, > Andre > -- > Andre Vehreschild * Email: vehre ad gmx dot de -- "If you can't explain it simply, you don't understand it well enough" - Albert Einstein
[PATCH, Fortran, pr79335, v1] [7 Regression] Conditional jump or move depends on uninitialised in value get_scalar_to_descriptor_type(tree_node*, symbol_attribute) (trans-expr.c:53)
Hi all, attached patch fixes the access of uninitialized data. Thanks Martin for analyzing this so far. The symbol_attributes on the stack was used without initializing it from the symbol's attributes. Bootstraps and regstests ok on x86_64-linux-gnu/f25. Ok for trunk? Regards, Andre -- Andre Vehreschild * Email: vehre ad gmx dot de gcc/fortran/ChangeLog: 2017-02-04 Andre VehreschildPR fortran/79335 * trans-decl.c (generate_coarray_sym_init): Retrieve the symbol's attributes before using them. 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 (, NULL); desc = gfc_conv_scalar_to_descriptor (, decl, attr); gfc_add_block_to_block (_init_block, );