This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug ada/81919] New: Compiler refuses to compile valid code


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.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]