On 24/02/2020 14:34, Thomas Koenig wrote:
Hi Mark,

Might need

         gfc_reduce_init_expr (e);

here.  The kind type parameter should be a constant expression.

Not needed. I've also checked use of the kind argument, it is evidently checked elsewhere: if k is allowed to be implicitly declared and is used as the kind argument errors are reported that it is not a constant, if implicit declaration is not allowed a "has no IMPLICIT type" error is produced.

Is there a test case that covers this already?  OK if such a test
case exists, also OK with such a test case (or if looking for it
is too bother :-)

I've had a quick look and there doesn't appear to be a test for using a non-constant for kind arguments. I think a proper set of tests for invalid kind arguments that covers declarations and intrinsic arguments should be added that is separate from this patch.  Should that be done while we're in stage 4 or should it wait for stage 1?

In the meantime I'll commit this patch either today or tomorrow.


Regards

    Thomas

--
https://www.codethink.co.uk/privacy.html

Reply via email to