Development Log

  • GNAT Pro
    Feb 2nd, 2016

    Remove extra copy of function result
    For an object_declaration of the form "X : T := Func (...);", where T is a nonlimited controlled type, the generated code was making an extra unnecessary copy of the function result. The extra copy is removed. Technically, the extra copy was a bug in obscure cases caught by ACATS, but normal programs wouldn't care, because Adjust/Finalize calls were properly matched. Thus, this is primarily an efficiency improvement -- the copy is avoided, along with the corresponding extra Adjust/Finalize pair.