https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83188

            Bug ID: 83188
           Summary: A class-wide type is considered different than itself
           Product: gcc
           Version: 7.2.0
            Status: UNCONFIRMED
          Keywords: rejects-valid
          Severity: normal
          Priority: P3
         Component: ada
          Assignee: unassigned at gcc dot gnu.org
          Reporter: porton at narod dot ru
  Target Milestone: ---

Created attachment 42734
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=42734&action=edit
a valid program which does not compile

The attached valid program (run `gnatchop script.all`) does not compile.

Weirdly enough, it compiles if I add `subtype X is Script_Info'Class;` in the
beginning of Resource.Parser package and replace all occurrences of
Script_Info'Class in resource-parser.ads and resource-parser.adb with `X`.

$ gcc --version
gcc (Debian 7.2.0-16) 7.2.0

$ make
gprbuild -p main.gpr
Compile
   [Ada]          resource-parser.adb
resource-parser.ads:10:24: not subtype conformant with operation inherited at
line 7
resource-parser.ads:10:24: return type does not match

Reply via email to