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

--- Comment #4 from Paul Thomas <pault at gcc dot gnu.org> ---
Created attachment 62764
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=62764&action=edit
Fix that allows the fiats source to compile

I don't know yet if the second chunk in trans-expr.cc works or not. I was
hoping to demonstrate that with the tests. Frankly, it looks a bit clunky but
it works.

concurrent_inferences.f90 compiles with this workaround:
...snip...

  integer i, num_trials, sz(3)

  network_file_name = string_t(command_line%flag_value("--network"))

  if (len(network_file_name%string())==0) then
    error stop                      new_line('') // new_line('') &
      // 'Usage:'                                // new_line('') &
      // '  fpm run \'                           // new_line('') &
      // '    --example concurrent-inferences \' // new_line('') &
      // '    --compiler flang-new \'            // new_line('') &
      // '    --flag -O3 \'                      // new_line('') &
      // '    -- --network "<file-name>" \'      // new_line('') &
      // '    [--do-concurrent] [--openmp] [--elemental] [--double-precision]
[--trials <integer>]' // new_line('') &
      // 'where <> indicates user input and [] indicates an optional argument.'
  end if

  inputs = random_inputs()
  sz = size(inputs)
  allocate(outputs(sz(1),sz(2),sz(3)), mold=inputs)

...snip...

It seems that we do not support fully array_spec-free allocations.

Reply via email to