public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug ada/52319] New: Legal program rejected, "use" clause in subpackage invalidates "use type" clause
@ 2012-02-20 22:44 nicolas.boulenguez at free dot fr
  2014-02-27 19:45 ` [Bug ada/52319] " nicolas.boulenguez at free dot fr
  0 siblings, 1 reply; 2+ messages in thread
From: nicolas.boulenguez at free dot fr @ 2012-02-20 22:44 UTC (permalink / raw)
  To: gcc-bugs

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

             Bug #: 52319
           Summary: Legal program rejected, "use" clause in subpackage
                    invalidates "use type" clause
    Classification: Unclassified
           Product: gcc
           Version: 4.6.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: ada
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: nicolas.boulenguez@free.fr


The following legal program is rejected by "gnatgcc -c proc.adb" with

proc.adb:17:28: there is no applicable operator "And" for type
"Standard.Integer"

All works fine if P2 is removed.

procedure Proc is
   package P1 is            
      type T is new Integer;                      
      function "and" (L, R : in Integer) return T;
   end P1;           
   package body P1 is                               
      function "and" (L, R : in Integer) return T is
         pragma Unreferenced (L, R);
      begin       
         return 0;
      end "and";
   end P1;       
   use type P1.T;
   package P2 is
      use P1;
   end P2;                                 
   G : P1.T := Integer'(1) and Integer'(2);
begin
   null;
end Proc;


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

* [Bug ada/52319] Legal program rejected, "use" clause in subpackage invalidates "use type" clause
  2012-02-20 22:44 [Bug ada/52319] New: Legal program rejected, "use" clause in subpackage invalidates "use type" clause nicolas.boulenguez at free dot fr
@ 2014-02-27 19:45 ` nicolas.boulenguez at free dot fr
  0 siblings, 0 replies; 2+ messages in thread
From: nicolas.boulenguez at free dot fr @ 2014-02-27 19:45 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from nicolas.boulenguez at free dot fr ---
Found in 4.9-20140218


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

end of thread, other threads:[~2014-02-27 19:45 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-02-20 22:44 [Bug ada/52319] New: Legal program rejected, "use" clause in subpackage invalidates "use type" clause nicolas.boulenguez at free dot fr
2014-02-27 19:45 ` [Bug ada/52319] " nicolas.boulenguez at free dot fr

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).