public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug ada/17732] New: Legal program rejected, RM 3.1.4(7)
@ 2004-09-29 18:20 ludovic dot brenta at insalien dot org
  2004-09-29 21:05 ` [Bug ada/17732] Legal program rejected, RM 4.1.3(7) ludovic dot brenta at insalien dot org
  2004-11-01  1:31 ` pinskia at gcc dot gnu dot org
  0 siblings, 2 replies; 4+ messages in thread
From: ludovic dot brenta at insalien dot org @ 2004-09-29 18:20 UTC (permalink / raw)
  To: gcc-bugs

This is Debian bug #274077, with a different title because GCC 3.4.2 and GNAT
3.15p give different symptoms.

with text_io;
procedure Test_120 is

   protected type pt1 is
      function f3 return integer;   -- overloaded
      function f4 return integer;   -- not overloaded
   end pt1;

   protected body pt1 is
      function f3 return integer is begin return 1; end;
      function f4 return integer is begin return 2; end;
   end pt1;

   protected type pt2 is
      function f3 return float;
   end pt2;

   protected body pt2 is
      function f3 return float is begin return 0.0; end;
   end pt2;

   type pt1_acc is access all pt1;
   type pt2_acc is access all pt2;

   x1: aliased pt1;
   x2: aliased pt2;
   function f1 return pt1_acc is begin return x1'access; end;
   function f1 return pt2_acc is begin return x2'access; end;

begin
   text_io.put_line(integer'image(f1.all.f4));
   text_io.put_line(integer'image(f1.f4));
   text_io.put_line(integer'image(f1.all.f3));
   text_io.put_line(integer'image(f1.f3));  -- should allow implicit .all
end Test_120;


GCC 3.4.2 gives:
test_120.adb:34:35: access type required in prefix of explicit dereference
gnatmake: "test_120.adb" compilation error

which is incorrect; the three lines above demonstrate correct behaviour.

GNAT 3.15p gives a bug box:
+===========================GNAT BUG DETECTED==============================+
| 3.15p  (20020523) (i486-pc-linux-gnu) Program_Error sem_type.adb:1348 explicit
raise|
| Error detected at test_120.adb:34:37                                     |


-- 
Ludovic Brenta.

-- 
           Summary: Legal program rejected, RM 3.1.4(7)
           Product: gcc
           Version: 3.4.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: ada
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: ludovic dot brenta at insalien dot org
                CC: gcc-bugs at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17732


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug ada/17732] Legal program rejected, RM 4.1.3(7)
  2004-09-29 18:20 [Bug ada/17732] New: Legal program rejected, RM 3.1.4(7) ludovic dot brenta at insalien dot org
@ 2004-09-29 21:05 ` ludovic dot brenta at insalien dot org
  2004-11-01  1:31 ` pinskia at gcc dot gnu dot org
  1 sibling, 0 replies; 4+ messages in thread
From: ludovic dot brenta at insalien dot org @ 2004-09-29 21:05 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|Legal program rejected, RM  |Legal program rejected, RM
                   |3.1.4(7)                    |4.1.3(7)


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17732


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug ada/17732] Legal program rejected, RM 4.1.3(7)
  2004-09-29 18:20 [Bug ada/17732] New: Legal program rejected, RM 3.1.4(7) ludovic dot brenta at insalien dot org
  2004-09-29 21:05 ` [Bug ada/17732] Legal program rejected, RM 4.1.3(7) ludovic dot brenta at insalien dot org
@ 2004-11-01  1:31 ` pinskia at gcc dot gnu dot org
  1 sibling, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-11-01  1:31 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-11-01 01:31 -------
Confirmed.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
           Keywords|                            |rejects-valid
   Last reconfirmed|0000-00-00 00:00:00         |2004-11-01 01:31:34
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17732


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug ada/17732] Legal program rejected, RM 4.1.3(7)
       [not found] <bug-17732-286@http.gcc.gnu.org/bugzilla/>
@ 2008-08-17 13:00 ` sam at gcc dot gnu dot org
  0 siblings, 0 replies; 4+ messages in thread
From: sam at gcc dot gnu dot org @ 2008-08-17 13:00 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from sam at gcc dot gnu dot org  2008-08-17 12:58 -------
This appears to be fixed in SVN trunk and GCC 4.3.1.


-- 

sam at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |sam at gcc dot gnu dot org
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED
   Target Milestone|---                         |4.3.1


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17732


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2008-08-17 13:00 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-09-29 18:20 [Bug ada/17732] New: Legal program rejected, RM 3.1.4(7) ludovic dot brenta at insalien dot org
2004-09-29 21:05 ` [Bug ada/17732] Legal program rejected, RM 4.1.3(7) ludovic dot brenta at insalien dot org
2004-11-01  1:31 ` pinskia at gcc dot gnu dot org
     [not found] <bug-17732-286@http.gcc.gnu.org/bugzilla/>
2008-08-17 13:00 ` 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).