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

simon at pushface dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |simon at pushface dot org

--- Comment #2 from simon at pushface dot org ---
OK (that is, this test code fails to compile for the expected reason,
rather than giving ICE) with 8.1.0 on x86_64-apple-darwin.

$ gnatmake -v b37101a.adb

GNATMAKE 8.1.0
Copyright (C) 1992-2018, Free Software Foundation, Inc.
  "b37101a.ali" being checked ...
  -> "b37101a.ali" missing.
gcc -c b37101a.adb
b37101a.adb:11:37: subtype mark required in this context
End of compilation
gnatmake: "b37101a.adb" Compilation error

In fact, it also succeeds with 4.8.1, & probably intermediate releases
too.

This may be down to the fact that the erroring line is (in 9.0.0)

   function Ekind (E : Entity_Id) return Entity_Kind is
   begin
      pragma Assert (Nkind (E) in N_Entity);          -- <<<<<<<<<<<
      return N_To_E (Nodes.Table (E + 1).Nkind);
   end Ekind;

i.e. an assertion which is disabled in release compilers, because it
ICEs in much the same way as the original with 9.0.0 20181103 & 20190115:

gcc -c b37101a.adb
+===========================GNAT BUG DETECTED==============================+
| 9.0.0 20190115 (experimental) (x86_64-apple-darwin15) Assert_Failure
atree.adb:994|
| Error detected at b37101a.adb:11:37                                      |

HOWEVER! The real b37101a.adb, from ACATS 4.1, fails to compile for the 
expected reaons,

$ gnatmake -v b37101a.adb 

GNATMAKE 9.0.0 20190115 (experimental)
Copyright (C) 1992-2019, Free Software Foundation, Inc.
  "b37101a.ali" being checked ...
  -> "b37101a.ali" missing.
gcc -c b37101a.adb
b37101a.adb:61:24: discriminants must have a discrete or access type
b37101a.adb:63:24: discriminants must have a discrete or access type
etc etc

Reply via email to