]> git.ipfire.org Git - thirdparty/gcc.git/commit - gcc/fortran/primary.c
re PR fortran/60357 ([F08] structure constructor with unspecified values for allocata...
authorAndre Vehreschild <vehre@gmx.de>
Sat, 17 Jan 2015 18:08:38 +0000 (19:08 +0100)
committerPaul Thomas <pault@gcc.gnu.org>
Sat, 17 Jan 2015 18:08:38 +0000 (18:08 +0000)
commit9b5485174b808986614d6d1d1f0ec319831c9ec4
tree06544cb03384b136934c7ff6d2f7abc201fc2c56
parent33c2207d3fda2956ac036f306fc8bfc58b635da0
re PR fortran/60357 ([F08] structure constructor with unspecified values for allocatable components)

2015-01-17  Andre Vehreschild  <vehre@gmx.de>

PR fortran/60357
* primary.c (build_actual_constructor): Prevent warning.
* trans-expr.c (alloc_scalar_allocatable_for_subcomponent_
assignment): New function encapsulates treatment of allocatable
components.
(gfc_trans_subcomponent_assign): Needed to distinguish between
regular assignment and initilization.
(gfc_trans_structure_assign): Same.
(gfc_conv_structure): Same.

PR fortran/61275
* gfortran.h: deferred_parameter is not needed, because
it artificial does the trick completely.
* primary.c (build_actual_constructor): Same.
(gfc_convert_to_structure_constructor): Same.
* resolve.c (resolve_fl_derived0): Same.
* trans-expr.c (gfc_conv_component_ref): Prevent treating
allocatable deferred length char arrays here.
(gfc_trans_subcomponent_assign): Same as above.
* trans-types.c (gfc_sym_type): This is done in
gfc_get_derived_type already.

2015-01-17  Andre Vehreschild  <vehre@gmx.de>

PR fortran/60357
* gfortran.dg/alloc_comp_assign_13.f08: New test.

PR fortran/61275
* gfortran.dg/alloc_comp_assign_14.f08: New test.

PR fortran/55932
* gfortran.dg/alloc_comp_initializer_4.f03: New test.

From-SVN: r219801
gcc/fortran/ChangeLog
gcc/fortran/gfortran.h
gcc/fortran/primary.c
gcc/fortran/resolve.c
gcc/fortran/trans-expr.c
gcc/fortran/trans-types.c
gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/alloc_comp_assign_13.f08 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/alloc_comp_assign_14.f08 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/alloc_comp_initializer_4.f03 [new file with mode: 0644]