OSDN Git Service

PR ada/53766
authorebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 15 Dec 2012 18:16:28 +0000 (18:16 +0000)
committerebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 15 Dec 2012 18:16:28 +0000 (18:16 +0000)
commitde98f9d1ebf53197a442d4aaf9efa2d4962ef2b5
tree11a9cf6d0d02b9d3d8733625c46d29ddceca33b2
parenta403d61d8607ca3a0e0090c7ef9de8c94f4fc749
PR ada/53766
Backport from mainline

2012-07-17  Hristian Kirtchev  <kirtchev@adacore.com>

* exp_attr.adb (Expand_N_Attribute_Reference): Add local variables Attr
and Conversion_Added.  Add local constant Typ.
Retrieve the original attribute after the arithmetic check
machinery has modified the node. Add a conversion to the target
type when the prefix of attribute Max_Size_In_Storage_Elements
is a controlled type.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_7-branch@194522 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ada/ChangeLog
gcc/ada/exp_attr.adb
gcc/testsuite/ChangeLog
gcc/testsuite/gnat.dg/controlled7.adb [new file with mode: 0644]
gcc/testsuite/gnat.dg/controlled7.ads [new file with mode: 0644]