On Thu, 2008-06-12 at 20:56 -0400, Andy H wrote:
The attach patch makes changes to struct-reorg.exp tests to remove test
failures due to invalid test.
Test suite symbol STACK_SIZE is used to limit number of structure
allocated, rather than fixed size (typically 1000) - thus avoiding
stack overflow.
If STACK_SIZE if not defined, or STACK_SIZE is large enough, the
existing limits are used.
A bug is removed from wo_prof_malloc_size_var.c where a random number
of structures were created (0-32767) but code always modified and
checked 1000 entries.
So 1 out of 32 runs would likely fail. Access is now limited to the
number of structures actually created.
wo_prof_two_strs is changed to limit random number to N rather than the
very odd zero..
Some but not all test omitted check of malloc return value. This is
added for non-trivial allocations as a further safeguard against access
violations.
XFAIL are added to some scan-ipa-dump tests which fails with AVR target.
Ok for 4.4 mainline?
2008-06-12 Andy Hutchinson <hutchinsonandy@aim.com>
* gcc.dg/struct/wo_prof_escape_substr_value.c: Limit allocation
based on STACK_SIZE.
* gcc.dg/struct/wo_prof_array_through_pointer.c: Ditto.
* gcc.dg/struct/wo_prof_escape_substr_pointer.c: Ditto.
* gcc.dg/struct/wo_prof_escape_arg_to_local.c: Limit allocation
based on STACK_SIZE. Check malloc return for NULL.
* gcc.dg/struct/w_prof_local_var.c: Ditto.
* gcc.dg/struct/wo_prof_mult_field_peeling.c: Ditto.
* gcc.dg/struct/w_prof_local_array.c: Limit allocation based on
STACK_SIZE. XFAIL AVR target.
* gcc.dg/struct/wo_prof_local_array.c: Ditto.
* gcc.dg/struct/w_prof_two_strs.c: Limit allocation based on
STACK_SIZE. Limit random size to N.
* gcc.dg/struct/wo_prof_two_strs.c: Limit allocation based on
STACK_SIZE. XFAIL AVR target. Limit random size to N.
* gcc.dg/struct/w_prof_single_str_global.c: XFAIL AVR target.
* gcc.dg/struct/wo_prof_array_field.c: Ditto.
* gcc.dg/struct/wo_prof_double_malloc.c: Ditto.
* gcc.dg/struct/wo_prof_global_array.c: Ditto.
* gcc.dg/struct/wo_prof_single_str_global.c: Ditto.
* gcc.dg/struct/wo_prof_single_str_local.c: Ditto.
* gcc.dg/struct/w_prof_global_var.c: Limit allocation based on
STACK_SIZE. Check malloc return for NULL. XFAIL AVR target.
* gcc.dg/struct/wo_prof_global_var.c: Ditto.
* gcc.dg/struct/wo_prof_local_var.c: Ditto.
* gcc.dg/struct/wo_prof_malloc_size_var.c: Access only allocated
space. Limit allocation based on STACK_SIZE. XFAIL AVR target.
Olga wrote these tests, so I'd like her to comment on the changes
in case they change what's being tested; the changes look OK to me.
Janis