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] Fix problem returning unaligned object


A compile time crash could result
from returning an array object which was not aligned to the alignment of the
array type, e.g. when a component clause was present. This patch fixes the
error by copying such results into a temporary first.

See gnat.dg/frunaligned.adb

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

2008-05-28  Robert Dewar  <dewar@adacore.com>

	* exp_ch5.adb:
	(Expand_Simple_Function_Return): Copy unaligned result into temporary

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]