(Debian bug #280939)

--  RM 10.1.5(4) "the pragma shall have an argument that is a name
--  denoting that declaration."
--  RM 8.1(16) "The children of a parent library unit are inside the
--  parent's declarative region."

package pak1 is
   pragma Pure;
end pak1;

procedure pak1.p2;
pragma Pure (p2);          -- ERROR: need expanded name
pragma Import (ada, p2);   -- ERROR: need expanded name
pragma Inline (p2);        -- ERROR: need expanded name

with Pak1.P2;
procedure Test_130 is
begin
   Pak1.P2;
end Test_130;


Expected output all three errors diagnosed:
pak1-p2.ads:3:13: "p2" is not directly visible
pak1-p2.ads:4:20: "p2" is not directly visible
pak1-p2.ads:5:15: "p2" is not directly visible


Actual output: the compiler says nothing, the linker, as expected,
can't find pak1.p2:

./test_130.o(.text+0x4): In function `_ada_test_130':
: undefined reference to `p2'
gnatlink: cannot call /usr/bin/gnatgcc
gnatmake: *** link failed.

-- 
           Summary: Illegal program not detected, RM 10.1.5(4), 8.1(16)
           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=18454

Reply via email to