https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84142
Bug ID: 84142 Summary: Implicit_Dereference with Generic Formal Incomplete Types Product: gcc Version: 7.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: ada Assignee: unassigned at gcc dot gnu.org Reporter: jhb.chat at gmail dot com Target Milestone: --- Host: Windows 10 mingw64 from MSYS2 Target: x86_64-w64-mingw32 I've found a few different ways to crash GNAT using the Implicit_Dereference aspect coupled with generic formal incomplete types. I've attached 3 different projects that all cause a GNAT crash. It is important to note that the first one (Implicit_Dereference1) does NOT cause GNAT GPL 2017 to crash while the remaining two projects do crash GNAT GPL 2017. That might indicate that it is a different bug for the first project. A typical crash on GNAT 7.2.0 (FSF) results in text similar to: $ gprbuild default.gpr gcc -c -gnato -gnatE -fstack-check -gnat12 main.adb +===========================GNAT BUG DETECTED==============================+ | 7.2.0 (x86_64-w64-mingw32) Segmentation fault | | Error detected at main.adb:56:9 | | Please submit a bug report; see https://gcc.gnu.org/bugs/ . | | Use a subject line meaningful to you and us to track the bug. | | Include the entire contents of this bug box in the report. | | Include the exact command that you entered. | | Also include sources listed below. | +==========================================================================+ Please include these source files with error report Note that list may not be accurate in some cases, so please double check that the problem can still be reproduced with the set of files listed. Consider also -gnatd.n switch (see debug.adb). .\Implicit_Dereference3\src\main.adb compilation abandoned gprbuild: *** compilation phase failed Just for comparison sake, I am also providing the GNAT GPL crash report as it lists it as a different type of crash (which may help hint to the FSF version's problem). The GNAT GPL 2017 report is as follows: Compile [Ada] main.adb +===========================GNAT BUG DETECTED==============================+ | GPL 2017 (20170515-63) (i686-pc-mingw32) Program_Error EXCEPTION_ACCESS_VIOLATION| | Error detected at s-stoele.adb:36:20 | | Please submit a bug report by email to rep...@adacore.com. | | GAP members can alternatively use GNAT Tracker: | | http://www.adacore.com/ section 'send a report'. | | See gnatinfo.txt for full info on procedure for submitting bugs. | | Use a subject line meaningful to you and us to track the bug. | | Include the entire contents of this bug box in the report. | | Include the exact command that you entered. | | Also include sources listed below. | | Use plain ASCII or MIME attachment(s). | +==========================================================================+ Please include these source files with error report Note that list may not be accurate in some cases, so please double check that the problem can still be reproduced with the set of files listed. Consider also -gnatd.n switch (see debug.adb). .\Implicit_Dereference3\src\main.adb compilation abandoned gprbuild: *** compilation phase failed [2018-01-30 20:31:25] process exited with status 4, elapsed time: 01.85s