public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug ada/36777] New: Protected type cannot have access taken from its body.
@ 2008-07-09 21:19 prog at msobczak dot com
2008-08-03 15:00 ` [Bug ada/36777] " sam at gcc dot gnu dot org
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: prog at msobczak dot com @ 2008-07-09 21:19 UTC (permalink / raw)
To: gcc-bugs
Protected type cannot have access taken from its body.
The following should work:
protected type P is
procedure Foo;
end P;
protected body P is
procedure Foo is
Ptr : access P; -- here P denotes the type P
begin
Ptr := P'Access; -- here P denotes the "this" instance of P
end;
end P;
The compiler complains that 'Access cannot be applied to a type, which is in
conflict with AARM 9.4-21/2.
--
Summary: Protected type cannot have access taken from its body.
Product: gcc
Version: 4.4.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: ada
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: prog at msobczak dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36777
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug ada/36777] Protected type cannot have access taken from its body.
2008-07-09 21:19 [Bug ada/36777] New: Protected type cannot have access taken from its body prog at msobczak dot com
@ 2008-08-03 15:00 ` sam at gcc dot gnu dot org
2008-08-13 11:00 ` sam at gcc dot gnu dot org
2008-08-13 11:02 ` sam at gcc dot gnu dot org
2 siblings, 0 replies; 4+ messages in thread
From: sam at gcc dot gnu dot org @ 2008-08-03 15:00 UTC (permalink / raw)
To: gcc-bugs
--
sam at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |sam at gcc dot gnu dot org
|dot org |
Status|UNCONFIRMED |ASSIGNED
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2008-08-03 14:59:16
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36777
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug ada/36777] Protected type cannot have access taken from its body.
2008-07-09 21:19 [Bug ada/36777] New: Protected type cannot have access taken from its body prog at msobczak dot com
2008-08-03 15:00 ` [Bug ada/36777] " sam at gcc dot gnu dot org
@ 2008-08-13 11:00 ` sam at gcc dot gnu dot org
2008-08-13 11:02 ` sam at gcc dot gnu dot org
2 siblings, 0 replies; 4+ messages in thread
From: sam at gcc dot gnu dot org @ 2008-08-13 11:00 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from sam at gcc dot gnu dot org 2008-08-13 10:59 -------
Subject: Bug 36777
Author: sam
Date: Wed Aug 13 10:57:43 2008
New Revision: 139051
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=139051
Log:
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.
Added:
trunk/gcc/testsuite/gnat.dg/protected_self_ref1.adb
trunk/gcc/testsuite/gnat.dg/protected_self_ref2.adb
Modified:
trunk/gcc/ada/ChangeLog
trunk/gcc/ada/exp_attr.adb
trunk/gcc/ada/sem_attr.adb
trunk/gcc/ada/sem_util.adb
trunk/gcc/ada/sem_util.ads
trunk/gcc/testsuite/ChangeLog
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36777
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug ada/36777] Protected type cannot have access taken from its body.
2008-07-09 21:19 [Bug ada/36777] New: Protected type cannot have access taken from its body prog at msobczak dot com
2008-08-03 15:00 ` [Bug ada/36777] " sam at gcc dot gnu dot org
2008-08-13 11:00 ` sam at gcc dot gnu dot org
@ 2008-08-13 11:02 ` sam at gcc dot gnu dot org
2 siblings, 0 replies; 4+ messages in thread
From: sam at gcc dot gnu dot org @ 2008-08-13 11:02 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from sam at gcc dot gnu dot org 2008-08-13 11:01 -------
This bug has been fixed in GCC SVN trunk. Thanks for the report.
--
sam at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
Target Milestone|--- |4.4.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36777
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2008-08-13 11:02 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-07-09 21:19 [Bug ada/36777] New: Protected type cannot have access taken from its body prog at msobczak dot com
2008-08-03 15:00 ` [Bug ada/36777] " sam at gcc dot gnu dot org
2008-08-13 11:00 ` sam at gcc dot gnu dot org
2008-08-13 11:02 ` sam at gcc dot gnu dot org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).