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] Binding error with inconsistent use of fstack-check.


When stack checking is enabled, the front-end generates additional temporaries
in certain cases, for example to capture values of expressions that may have
side effects. As a result, a program may fail to bind if it is first compiled
with stack-checking on, and subsequently recompiled (without recompiling its
context) with stack-checking disabled. because a different set of public
symbols will be generated. This patch removes one common source for this
conditional temporary generation, namely conversions between access types and
wrapper records of the appropriate size.

No small example available.

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

2009-04-08  Ed Schonberg  <schonberg@adacore.com>

	* exp_util.adb (Safe_Unchecked_Type_Conversion): Conversion is safe,
	i.e. does not need a temporary to capture the value, if expression is
	an acceess type, even if target type is a record whose size may not
	have been determined yet.

	* exp_disp.adb (Expand_Dispatching_Call): Set size info for generated
	access_to_subprogram type, to avoid order-of-elaboration anomalies in
	gigi.

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]