http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48095

--- Comment #6 from Tobias Burnus <burnus at gcc dot gnu.org> 2011-03-29 
10:19:02 UTC ---
(In reply to comment #5)
> I would assume that one needs a similar check in resolve_structure_cons.

That should then also take care of:

  rect = rectangle (1.0, 2.0, get_my_area)

which had the same issue, except that it is currently rejected with:

  Error: Function 'get_my_area' requires an argument list at (1)

However, if I read the standard correctly (F2008, 4.5.10 Construction of
derived-type values), it should be valid:

  R456 component-spec  is  [ keyword = ] component-data-source
  R457 component-data-source  is  expr
                              or  data-target
                              or  proc-target
  R740 proc-target  is  expr
                    or  procedure-name
                    or  proc-component-ref

  C497 (R457) A data-target shall correspond to a data pointer component;
              a proc-target shall correspond to a procedure pointer component.

Reply via email to