Hi Tobias, > > The KIND argument to intrinsics must be a compile-time argument. > > Improve check so that the proper diagnostics is emitted. > > > > > > - if (!gfc_check_init_expr (k)) > > + if (!gfc_check_init_expr (k) || k->expr_type == EXPR_VARIABLE) > > I think the real question is why is the following regarded as initialization > expression: > t = true; > … > if (gfc_check_iter_variable (e)) > break;
you completely lost me here. Did you accidentally delete some context? > Or worded differently: If > integer, parameter :: A(*) = [(i, i=1,5)] > is valid, which should > integer, parameter :: B(*) = [integer :: (int(i, kind=i), i=1,2)] > be invalid? Well, my copy of the F2018-FDIS says about the KIND argument to INT: "KIND (optional) shall be a scalar integer constant expression." Are you saying that (int(i, kind=i), i=1,2) is legal? It would be helpful if you explained why "i" in kind=i is a constant expression. > Thus, the first question should be whether that is valid code > according to the Fortran standard or not. Indeed. Harald