Bug 18454 - Illegal program not detected, RM 10.1.5(4), 8.1(16)
Summary: Illegal program not detected, RM 10.1.5(4), 8.1(16)
Status: NEW
Alias: None
Product: gcc
Classification: Unclassified
Component: ada (show other bugs)
Version: 3.4.2
: P2 minor
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords: accepts-invalid
Depends on:
Blocks:
 
Reported: 2004-11-12 16:37 UTC by Ludovic Brenta
Modified: 2015-12-05 11:00 UTC (History)
3 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2005-06-14 20:45:10


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ludovic Brenta 2004-11-12 16:37:13 UTC
(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.
Comment 1 Andrew Pinski 2004-11-24 21:12:30 UTC
Confirmed.
Comment 2 Nicolas Boulenguez 2011-08-31 14:00:40 UTC
found 4.6.1
Comment 3 Nicolas Boulenguez 2014-02-27 18:49:12 UTC
Found in 4.9-20140218
Comment 4 Eric Botcazou 2015-12-05 11:00:27 UTC
The error is still missing.