Commit Message

You can invoke a procedure on a cast (type conversion) in Ada, even if the
formal parameter is Out or In Out; if this case, the conversion is deemed a
view conversion and is applied in both directions.
Geert just found out that we don't properly handle these view conversions for
unconstrained array types, because we simply drop them somewhere in gigi.
Fixed thusly, tested on i586-suse-linux, applied on the mainline.
2011-05-12 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/trans.c (call_to_gnu): In the by-reference case, if the
type of the parameter is an unconstrained array, convert the actual to
the type of the formal in the In Out and Out cases as well.
2011-05-12 Geert Bosch <bosch@adacore.com>
* gnat.dg/view_conversion1.adb: New test.