(Debian bug #339356, which I realize was never forwarded upstream until now)
procedure gnat_bug is type voie is range 1..10; protected carrefour is entry entree_carrefour (voie); end carrefour; protected body carrefour is entry entree_carrefour (for v in voie) when true is begin accept entree_carrefour(v); -- remove this and you have a valid program end entree_carrefour; end carrefour; begin null; end gnat_bug; $ gnatmake gnat_bug.adb gnatgcc -c gnat_bug.adb +===========================GNAT BUG DETECTED==============================+ | 3.15p (Debian 3.15p-16) (i486-pc-linux-gnu) Assert_Failure atree.adb:678 | | Error detected at gnat_bug.adb:13:10 | +===========================GNAT BUG DETECTED==============================+ | 4.1.2 20061115 (prerelease) (Debian 4.1.1-22) (i486-pc-linux-gnu) | | Assert_Failure atree.adb:812 | | Error detected at gnat_bug.adb:13:10 | gcc-4.3 -c gnat_bug.adb +===========================GNAT BUG DETECTED==============================+ | 4.3.2 (i486-pc-linux-gnu) Assert_Failure atree.adb:886 | | Error detected at gnat_bug.adb:13:10 | gcc-4.4 -c gnat_bug.adb +===========================GNAT BUG DETECTED==============================+ | 4.4.1 (i486-pc-linux-gnu) Assert_Failure atree.adb:884 | | Error detected at gnat_bug.adb:13:10 | -- Summary: Assert_Failure atree.adb:884 on illegal code (mixture of protected object and accept of entry family) Product: gcc Version: 3.1 Status: UNCONFIRMED Severity: normal Priority: P3 Component: ada AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: ludovic at ludovic-brenta dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40936