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]

Re: [patch] support for temps of variable size with const upper bound


Re: http://gcc.gnu.org/ml/gcc-patches/2006-05/msg01189.html
On Tue, 23 May 2006, Olivier Hainque wrote:
> 2006-05-23  Olivier Hainque  <hainque@adacore.com>
>
> 	* tree.c (max_int_size_in_bytes): New function, inspired from
> 	code in function.c:assign_temp.
> 	* tree.h (max_int_size_in_bytes): Declare.
> 	* function.c (assign_temp): Use it.
> 	* gimplify.c (create_tmp_var): Relax the assertions on the type
> 	properties, not mandating constant size any more.
> 	(force_constant_size): New static function.
> 	(gimple_add_tmp_var): Use it, forcing variable size to a
> 	constant upper bound if it is not constant on entry.
> 	* ada/misc.c (gnat_type_max_size): Look at TYPE_ADA_SIZE if we have
> 	not been able to get a constant upper bound from TYPE_SIZE_UNIT.

This is OK for mainline, provided that the Ada folks are happy with the
change to ada/misc.c?  This is another regression fix (therefore suitable
for stage3), and should only affect code that currently ICEs in the
gimplifier.

I've a little concern that there may be issues with temporary
variables whose maximum size may be very large, but given that this
duplicates what we used to do in RTL expansion, and only affects the
Ada front-end, I'm happy that you guys know what you're doing.

Once again could you add the Ada "procedure P" testcase from your
post above to the gnat testsuite, confirming that it ICEs the compiler
without your change, but PASSes fine with it.

Thanks in advance,

Roger
--


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