This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran 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: MVBITS again


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


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