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]

[Fortran, Patch] (Coarrays) Wrong events size


Dear all,

currently, the compiler doesn't pass the right size to the
registration routine of OpenCoarrays for event variables:

size.15 = 0;

ev.data = (void * restrict) _gfortran_caf_register (MAX_EXPR <size.15,
1>, 6, &ev.token, 0B, 0B, 0);

The attached patch solves the problem.

I don't understand the following block in trans-types.c:

  if (flag_coarray != GFC_FCOARRAY_LIB
      && derived->from_intmod == INTMOD_ISO_FORTRAN_ENV
      && derived->intmod_sym_id == ISOFORTRAN_EVENT_TYPE)
    return gfc_get_int_type (gfc_default_integer_kind);

Why should an event variable be different from a lock variable when
LIBCAF_SINGLE is used?

The patch has been built and regtested on x86_64-pc-linux-gnu.

Ok for trunk and gcc-5-branch?

Attachment: events_alloc.diff
Description: Text document


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