Commit Message

This is an internal error on a postcondition applying the 'Old attribute to a
parameter with discriminated record type. The problem is that S'Old ends up
being rewritten into a local constrained variable very late in the game by the
front-end and this yields a slightly skewed tree.
Fixed thusly, tested on x86_64-suse-linux, applied on the mainline.
2012-11-23 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/trans.c (Attribute_to_gnu) <Attr_Length>: Look through
a view conversion from constrained to unconstrained form.
2012-11-23 Eric Botcazou <ebotcazou@adacore.com>
* gnat.dg/discr40.ad[sb]: New test.