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] Derived iterable types with noniterable parent


This patch fixes a bug in which if a derived type has a Default_Iterator
specified, and the parent type does not, then a "for ... of" loop causes
the compiler to crash. No small test case available.

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

2017-09-06  Bob Duff  <duff@adacore.com>

	* exp_ch5.adb (Get_Default_Iterator): Replace
	"Assert(False)" with "return Iter", because if an iterable
	type is derived from a noniterable one, then we won't find an
	overriding or inherited default iterator.

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]