This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Ada] Compiler crash with -gnatd.1 (force unnesting of subprograms)


This patch fixes a crash in the compiler when enabling unnesting of subprograms
on a generic unit.

The following must compile quietly:

gcc -c -gnatg -gnatd.1 a-btgbso.adb

Tested on x86_64-pc-linux-gnu, committed on trunk

2017-12-15  Ed Schonberg  <schonberg@adacore.com>

	* exp_unst.adb (Unnest_Subprograms): Nothing to do if the main unit is
	a generic package body. Unnesting is only an issue when generating
	code, and if the main unit is generic then nested instance bodies have
	not been created and analyzed, and unnesting will crash in the absence
	of those bodies,

Attachment: difs
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]