OK. Thanks for the patch.

Paul

On Wed, 6 Feb 2019 at 20:27, Thomas Koenig <tkoe...@netcologne.de> wrote:
>
> Hello world,
>
> this patch fixes a 7/8/9 regression where we tried to accept invalid
> code, which led to an ICE later on.
>
> The patch is rather straightforward.  The reason why I could not
> use gfc_expr_attr is that it does not actually return the
> flags the way they can be found in the original attributes;
> for example, an expression containing a pointer attribute is
> shown as having the target attribute, for reasons I cannot
> fathom.
>
> Regression-tested.  OK for trunk and other open branches?
>
> Regards
>
>         Thomas
>
> 2019-02-06  Thomas Koenig  <tkoe...@gcc.gnu.org>
>
>         PR fortran/71237
>         * expr.c (gfc_check_assign): Add argument is_init_expr.  If we are
>         looking at an init expression, issue error if the target is not a
>         TARGET and we are not looking at a procedure pointer.
>         * gfortran.h (gfc_check_assign): Add optional argument
>         is_init_expr.
>
> 2019-02-06  Thomas Koenig  <tkoe...@gcc.gnu.org>
>
>         PR fortran/71237
>         * gfortran.dg/pointer_init_2.f90: Adjust error messages.
>         * gfortran.dg/pointer_init_6.f90: Likewise.
>         * gfortran.dg/pointer_init_9.f90: New test.



-- 
"If you can't explain it simply, you don't understand it well enough"
- Albert Einstein

Reply via email to