This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [Patch, Fortran, F08] PR45290: pointer initialization


> But adding this patchlet:
>
>
> Index: gcc/fortran/primary.c
> ===================================================================
> --- gcc/fortran/primary.c ? ? ? (revision 163310)
> +++ gcc/fortran/primary.c ? ? ? (working copy)
> @@ -2017,8 +2017,6 @@ gfc_variable_attr (gfc_expr *expr, gfc_typespec *t
> ? ? }
>
> ? target = attr.target;
> - ?if (pointer || attr.proc_pointer)
> - ? ?target = 1;
>
> ? if (ts != NULL && expr->ts.type == BT_UNKNOWN)
> ? ? *ts = sym->ts;
> @@ -2074,8 +2072,6 @@ gfc_variable_attr (gfc_expr *expr, gfc_typespec *t
> ? ? ? ? ? ?pointer = comp->attr.pointer;
> ? ? ? ? ? ?allocatable = comp->attr.allocatable;
> ? ? ? ? ?}
> - ? ? ? if (pointer || attr.proc_pointer)
> - ? ? ? ? target = 1;
>
> ? ? ? ?break;
>
>
> gives me a couple of regressions:
>
>
> FAIL: gfortran.fortran-torture/execute/ptr.f90 compilation, ?-O0
> FAIL: gfortran.dg/c_loc_tests_14.f90 ?-O ?(test for excess errors)
> FAIL: gfortran.dg/c_loc_tests_5.f03 ?-O ?(test for excess errors)
> FAIL: gfortran.dg/pointer_assign_4.f90 ?-O0 ?(test for excess errors)
> FAIL: gfortran.dg/pr43984.f90 ?-O ?(test for excess errors)
> FAIL: gfortran.dg/subref_array_pointer_1.f90 ?-O0 ?(test for excess errors)
>
> All of them, except the C_LOC ones, fail on pointer assignments. And I
> think all of them are actually invalid.


Here is an updated patch, which fixes the invalid test cases. It
should be free of regressions.

Ok so far?

I will re-check for regressions and take care of implicit SAVE in
PROGRAMS tomorrow.

Cheers,
Janus

Attachment: pr45290_v4.diff
Description: Binary data


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]