re PR ada/36777 (Protected type cannot have access taken from its body.)
commit2d14501c4714ef2b4ab848d52d22a1c700804197
authorSamuel Tardieu <sam@rfc1149.net>
Wed, 13 Aug 2008 10:57:43 +0000 (13 10:57 +0000)
committerSamuel Tardieu <sam@gcc.gnu.org>
Wed, 13 Aug 2008 10:57:43 +0000 (13 10:57 +0000)
treec41ab659ced89553be1789d5dab8a19dc9465c2f
parent85790e667775932ee784b9c1636dafcc66ac32d3
re PR ada/36777 (Protected type cannot have access taken from its body.)

    gcc/ada/
PR ada/36777
* sem_util.ads, sem_util.adb (Is_Protected_Self_Reference): New.
* sem_attr.adb (Check_Type): The current instance of a protected
object is not a type name.
(Analyze_Access_Attribute): Accept instances of protected objects.
(Analyze_Attribute, Attribute_Address clause): Ditto.
* exp_attr.adb (Expand_N_Attribute_Reference): Rewrite
the prefix as being the current instance if needed.

    gcc/testsuite/
PR ada/36777
* gnat.dg/protected_self_ref1.adb, gnat.dg/protected_self_ref2.adb:
New.

From-SVN: r139051
gcc/ada/ChangeLog
gcc/ada/exp_attr.adb
gcc/ada/sem_attr.adb
gcc/ada/sem_util.adb
gcc/ada/sem_util.ads
gcc/testsuite/ChangeLog
gcc/testsuite/gnat.dg/protected_self_ref1.adb [new file with mode: 0644]
gcc/testsuite/gnat.dg/protected_self_ref2.adb [new file with mode: 0644]