public inbox for fortran@gcc.gnu.org
 help / color / mirror / Atom feed
From: Janne Blomqvist <blomqvist.janne@gmail.com>
To: Toon Moene <toon@moene.org>,
	ams@codesourcery.com, 	GCC Patches <gcc-patches@gcc.gnu.org>,
	Fortran List <fortran@gcc.gnu.org>
Subject: Re: [PATCH 08/25] Fix co-array allocation
Date: Wed, 05 Sep 2018 18:07:00 -0000	[thread overview]
Message-ID: <CAO9iq9HSBfLANeKKUD=8byyNoujnWG2+Q7wGGWwXf3jmiS5ddA@mail.gmail.com> (raw)
In-Reply-To: <7f5064c3-afc6-b7b5-cade-f03af5b86331@moene.org>

Please send fortran patches to the fortran list as well!

On Wed, Sep 5, 2018 at 7:54 PM Toon Moene <toon@moene.org> wrote:

>
>
>
> -------- Forwarded Message --------
> Subject: [PATCH 08/25] Fix co-array allocation
> Date: Wed, 5 Sep 2018 12:49:40 +0100
> From: ams@codesourcery.com
> To: gcc-patches@gcc.gnu.org
>
>
> The Fortran front-end has a bug in which it uses "int" values for "size_t"
> parameters.  I don't know why this isn't problem for all 64-bit
> architectures,
> but GCN ends up with the data in the wrong argument register and/or
> stack slot,
> and bad things happen.
>
> This patch corrects the issue by setting the correct type.
>
> 2018-09-05  Kwok Cheung Yeung  <kcy@codesourcery.com>
>
>         gcc/fortran/
>         * trans-expr.c (gfc_trans_structure_assign): Ensure that
>         integer_zero_node is of sizetype when used as the first
>         argument of a call to _gfortran_caf_register.
>

The argument must be of type size_type_node, not sizetype. Please instead
use

size = build_zero_cst (size_type_node);


>         * trans-intrinsic.c (conv_intrinsic_event_query): Convert computed
>         index to a size_t type.
>

Using integer_type_node is wrong, but the correct type for calculating
array indices (lbound, ubound,  etc.) is not size_type_node but rather
gfc_array_index_type (which in practice maps to ptrdiff_t). So please use
that, and then fold_convert index to size_type_node just before generating
the call to event_query.


>         * trans-stmt.c (gfc_trans_event_post_wait): Likewise.
>

Same here as above.

Thanks,
-- 
Janne Blomqvist

  parent reply	other threads:[~2018-09-05 18:07 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <024e798b9539b765a1259cfc9cb2f1dc480b24ca.1536144068.git.ams@codesourcery.com>
2018-09-05 16:54 ` Fwd: " Toon Moene
2018-09-05 17:02   ` Bernhard Reutner-Fischer
2018-09-05 18:07   ` Janne Blomqvist [this message]
2018-09-19 16:24     ` Andrew Stubbs
2018-09-19 21:18       ` Damian Rouson
2018-09-19 22:30         ` Andrew Stubbs
2018-09-19 23:09           ` Damian Rouson
2018-09-20 20:02         ` Thomas Koenig
2018-09-20 20:56           ` Damian Rouson
2018-09-21  7:33           ` Toon Moene
2018-09-23 11:40             ` Janne Blomqvist
2018-09-21 16:25           ` OpenCoarrays integration with gfortran Jerry DeLisle
2018-09-21 19:13             ` Janne Blomqvist
2018-09-21 19:37             ` Richard Biener
2018-09-21 20:17             ` Damian Rouson
2018-09-21 23:23               ` Jerry DeLisle
2018-09-23  9:47                 ` Toon Moene
2018-09-23 16:48                   ` Bernhard Reutner-Fischer
2018-09-23 19:17                     ` Toon Moene
2018-09-23 20:19                       ` Bernhard Reutner-Fischer
2018-09-24 10:58                   ` Alastair McKinstry
2018-09-27 12:29                     ` Richard Biener
2018-09-27 13:32                       ` Jorge D'Elia
2018-09-20 15:56       ` [PATCH 08/25] Fix co-array allocation Janne Blomqvist
2018-09-20 16:23         ` Andrew Stubbs

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAO9iq9HSBfLANeKKUD=8byyNoujnWG2+Q7wGGWwXf3jmiS5ddA@mail.gmail.com' \
    --to=blomqvist.janne@gmail.com \
    --cc=ams@codesourcery.com \
    --cc=fortran@gcc.gnu.org \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=toon@moene.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).