This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug ada/81919] New: Compiler refuses to compile valid code
- From: "porton at narod dot ru" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 21 Aug 2017 19:40:27 +0000
- Subject: [Bug ada/81919] New: Compiler refuses to compile valid code
- Auto-submitted: auto-generated
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81919
Bug ID: 81919
Summary: Compiler refuses to compile valid code
Product: gcc
Version: 7.1.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: ada
Assignee: unassigned at gcc dot gnu.org
Reporter: porton at narod dot ru
Target Milestone: ---
Created attachment 42023
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=42023&action=edit
A file which does not compile
The compiler refuses to verify the code in attached file.
$ gnatgcc -gnatc -gnat2012 -c my.ads
my.ads:23:09: type must be declared abstract or "First" overridden
my.ads:23:09: "First" has been inherited from subprogram at a-iteint.ads:26,
instance at line 9
We think that the refusal to compile it is a compiler bug.
Note that if I remove "type Iterated_Object is access all Integer;" and replace
"type Cursor is new Iterated_Object;" with "type Cursor is access all Integer;"
then the compiler does not complaint.