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: unassig...@gcc.gnu.org ReportedBy: nicolas.bouleng...@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;