https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102595

--- Comment #8 from Jerry DeLisle <jvdelisle at gcc dot gnu.org> ---
I started to do some variations on the z1.f90 case:

program p
   complex, parameter :: x(0) = 2
   !data x%im /3.0/
   print *, x
end

Running this prints a blank line;

Looking at the -fdump-tree-original shows:

      parm.1.span = 8;
      parm.1.dtype = {.elem_len=8, .rank=1, .type=4};
      parm.1.dim[0].lbound = 1;
      parm.1.dim[0].ubound = 0;
      parm.1.dim[0].stride = 1;
      parm.1.data = (void *) &x[0];
      parm.1.offset = -1;

Is it valid to have an ubound less than the lbound?

program p
   complex, parameter :: x(1) = 2
   !data x%im /3.0/
   print *, x
end

The z2 case prints what is expected.  It looks like we need to catch something
in the parameter declaration before the data statement so that it is not
garbage later.

.. to be continued ..

Reply via email to