This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: [Patch, Fortran, F08] PR 60357: structure constructor with unspecified values for allocatable components
- From: Janus Weil <janus at gcc dot gnu dot org>
- To: Paul Richard Thomas <paul dot richard dot thomas at gmail dot com>
- Cc: gfortran <fortran at gcc dot gnu dot org>, gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Mon, 29 Dec 2014 11:51:37 +0100
- Subject: Re: [Patch, Fortran, F08] PR 60357: structure constructor with unspecified values for allocatable components
- Authentication-results: sourceware.org; auth=none
- References: <CAKwh3qjR4v8bYBNJqAJ56remHeAo4pYyf4YbaBuq7ZhiQaLuNQ at mail dot gmail dot com> <CAGkQGiKOKG-QjD2y5SKdpiwX0kWq=KbfjBn=YmV8afcmwx4O6w at mail dot gmail dot com>
Hi Paul,
> It looks good to me. I wonder if the testcase should not changed to { dg-do
> run } and the allocatable component tested for not being allocated? You
> might also consider adding an allocatable array component too....
>
> OK for trunk modulo considerations above
those are good points you're making. I extended the test case
accordingly and committed the whole thing as r219098. Thanks for the
review!
> PS happy New Year!
Same to you and everyone else on this mailing list!
Cheers,
Janus
> On 27 December 2014 at 18:35, Janus Weil <janus@gcc.gnu.org> wrote:
>>
>> Hi all,
>>
>> here is a small patch for an F08 extension: Allocatable components
>> don't have to be specified in structure constructors any more.
>>
>> Regtested on x86_64-unknown-linux-gnu. Ok for trunk?
>>
>> Cheers,
>> Janus
>>
>>
>>
>> 2014-12-27 Janus Weil <janus@gcc.gnu.org>
>>
>> PR fortran/60357
>> * array.c (check_constructor): Ignore empty expressions.
>> * expr.c (check_alloc_comp_init): Check if constructor expression
>> exists.
>> * primary.c (build_actual_constructor): Warn for absent alloc-comp
>> initializers in pre-2008 standards.
>>
>> 2014-12-27 Janus Weil <janus@gcc.gnu.org>
>>
>> PR fortran/60357
>> * gfortran.dg/alloc_comp_constructor_7.f90: New.
>
>
>
>
> --
> The knack of flying is learning how to throw yourself at the ground and
> miss.
> --Hitchhikers Guide to the Galaxy