This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: MVBITS again
- From: "Paul Richard Thomas" <paul dot richard dot thomas at gmail dot com>
- To: "Daniel Kraft" <d at domob dot eu>
- Cc: "Fortran List" <fortran at gcc dot gnu dot org>
- Date: Fri, 24 Oct 2008 07:57:55 +0200
- Subject: Re: MVBITS again
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=X/9BOGFjJnQhmZ58JNvoB+JMS5HUDLYRyT0IgEXNgYw=; b=IOaN8ooAbSpQjPCHv6IZC73X+/A/0N2xrnC4prBm3EkjM8F0vh0Db9ErLCYHdorjcy i5/kzyu3B07IiRgp4I6AAeGMFraBem0fmcyKf/otMI7V4Gi2XFkosqw+r841zwNG1L0l /ayXaiGI0tFDTPjrJafGWe0j9BlUX3EYzvO0k=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=OdyYpsQpUIcrYhjxaSImSKx+j/arpUpVxOiy4Xvb64YsrabRuzs+IHQ9+icwjxAp+v il3NCKMoFXT8pHJ7+XAccKvRHUo91zJz4VzVj7ayaAbFSFPlVsChparycyIS0s2UCr/m TAoyWsIyOSE7EvrFx9OGUq8SN4Xx09qX5UzWs=
- References: <4900DB19.2060404@domob.eu>
Daniel,
> While this now creates a temporary for the output array, the output is still
> wrong as MVBITS wants an INTENT(*INOUT*) argument and the created temporary
> does not take over the initial values on creation. It seems to me like a
> bug in gfc_conv_elemental_dependencies, as this should indeed be done for
> INTENT(*INOUT*), shouldn't it? So my question, do you think it's ok to fix
> this there in general or is it done the way it is at the moment for some
> reason I'm missing at the moment, so that I must not "fix" this behaviour?
I don't see why not. It's not a bug because, until now, only
INTENT(OUT) arrived there; from interface assignements.
>
> What I'm proposing to do is to add a memcpy call there after creating the
> temporary that transfers the mirrored argument's content to the temporary
> for INOUT arguments (for OUT arguments nothing would change). With this
> change in addition to my patch (I'd change the XXX-marked hack into only
> bypassing check_dependencies if the call is really to intrinsic MVBITS) I
> think we've got quite reasonable chances that MVBITS works correct with
> dependencies, iff called *without* parentheses in the first argument. That
> is, I hope we can handle the special MVBITS exception with this.
OK
>
> That would then "only" leave open the ELEMENTAL-general (...) temporary
> thing.
I'll think about that.
Paul