[Bug fortran/101918] LTO type mismatches for runtime library functions in mixed -fdefault-real-8 projects

rimvydas.jas at gmail dot com gcc-bugzilla@gcc.gnu.org
Mon Aug 30 22:26:45 GMT 2021


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

--- Comment #20 from Rimvydas (RJ) <rimvydas.jas at gmail dot com> ---
Full -fdump-tree-original foo.f90.005t.original from Comment #8 example:

__attribute__((fn spec (". ")))
void foo ()
{
  static real(kind=8) b[4] = {[0 ... 3]=1.0e+0};
  real(kind=8) h[4];

  {
    struct array02_real(kind=8) parm.0;
    struct array01_real(kind=8) parm.1;
    struct array01_real(kind=8) * D.3962;
    static integer(kind=8) A.2[2] = {2, 2};
    struct array01_integer(kind=8) parm.3;
    struct array01_integer(kind=8) * D.3971;

    parm.0.span = 8;
    parm.0.dtype = {.elem_len=8, .rank=2, .type=3};
    parm.0.dim[0].lbound = 1;
    parm.0.dim[0].ubound = 2;
    parm.0.dim[0].stride = 1;
    parm.0.dim[1].lbound = 1;
    parm.0.dim[1].ubound = 2;
    parm.0.dim[1].stride = 2;
    parm.0.data = (void *) &h[0];
    parm.0.offset = -3;
    parm.1.span = 8;
    parm.1.dtype = {.elem_len=8, .rank=1, .type=3};
    parm.1.dim[0].lbound = 1;
    parm.1.dim[0].ubound = 4;
    parm.1.dim[0].stride = 1;
    parm.1.data = (void *) &b[0];
    parm.1.offset = -1;
    D.3962 = &parm.1;
    parm.3.span = 8;
    parm.3.dtype = {.elem_len=8, .rank=1, .type=1};
    parm.3.dim[0].lbound = 1;
    parm.3.dim[0].ubound = 2;
    parm.3.dim[0].stride = 1;
    parm.3.data = (void *) &A.2[0];
    parm.3.offset = -1;
    D.3971 = &parm.3;
    _gfortran_reshape_r8 (&parm.0, D.3962, D.3971, 0B, 0B);
  }
  bar ();
}


__attribute__((externally_visible))
integer(kind=4) main (integer(kind=4) argc, character(kind=1) * * argv)
{
  static integer(kind=4) options.4[7] = {2116, 4095, 0, 1, 1, 0, 31};

  _gfortran_set_args (argc, argv);
  _gfortran_set_options (7, &options.4[0]);
  foo ();
  return 0;
}


More information about the Gcc-bugs mailing list