From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: GNAT bug with protected procedure interrupt handler Date: Sat, 25 Jun 2016 14:15:12 +0100 Organization: A noiseless patient Spider Message-ID: References: <35e9e475-7ddd-49ec-a7a3-1e72810b27f1@googlegroups.com> <9129d5b1-0363-4da7-9af2-8406e74b2d32@googlegroups.com> <24ed2937-9413-4948-aee7-e9bbd44a012c@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: mx02.eternal-september.org; posting-host="15bacc9237911e76a94be23536470c55"; logging-data="10757"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+C1bctMhch1wApvOXXYGcQ+/bpCrlEmj0=" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (darwin) Cancel-Lock: sha1:3XL50ZgsoTP/VjOqOnk0qJmNPIo= sha1:15/WKXhcaSsjPGn6DkcFz4S1tsQ= Xref: news.eternal-september.org comp.lang.ada:30930 Date: 2016-06-25T14:15:12+01:00 List-Id: Daniel King writes: > On Saturday, 25 June 2016 04:28:01 UTC-3, Simon Wright wrote: >> Egil H H writes: >> >> > On Saturday, June 25, 2016 at 4:40:31 AM UTC+2, Daniel King wrote: >> >> >> >> Has anyone else seen this problem, or are able to reproduce it? Have >> >> you found a workaround? >> >> >> > >> > Your code works here (except that RTC_Interrupt does not exist, so I >> > changed it to RCC_Interrupt) >> >> Likewise. >> >> Compiling with -gnatG (shows a representation of the intermediate code) >> sometimes shows up a problem. > > Thanks, whilst trying your suggestion I realised that actually, the > code *compiles* fine for me too, the failure seems to occur only when > using -gnatc to check syntax/semantics only. When I first posted I had > not yet compiled the code because I was checking my .ads file since I > had not yet written a corresponding .adb file to compile. > > So although the GNAT bug still occurs when using -gnatc at least the > code compiles fine so I can still continue with my project. You appear to have come across another instance of PR66162! Yours is an instance of comment 4. I still don't know what the language restrictions for building the runtime are; I think that they relate to RTS units that the compiler relies on to generate calls into the RTS, for instance for POs. So far, off the top of my head, I have * no private withs * no 'use' clauses in the spec * no visibility of non-System, non-Interface packages * no package aspects (not sure about this) [1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66162