wo_prof_escape_substr_value.c: Limit allocation based on STACK_SIZE.
* 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. From-SVN: r140126
This commit is contained in:
parent
d70ddd9078
commit
564475d71f
@ -1,3 +1,33 @@
|
||||
2008-09-08 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.
|
||||
|
||||
2008-09-08 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
|
||||
|
||||
* g++.dg/cdce3.C: Require c99 runtime.
|
||||
|
@ -5,7 +5,15 @@ typedef struct
|
||||
float b;
|
||||
}str_t;
|
||||
|
||||
#ifdef STACK_SIZE
|
||||
#if STACK_SIZE > 8000
|
||||
#define N 1000
|
||||
#else
|
||||
#define N (STACK_SIZE/8)
|
||||
#endif
|
||||
#else
|
||||
#define N 1000
|
||||
#endif
|
||||
|
||||
str_t *p;
|
||||
|
||||
@ -15,7 +23,8 @@ main ()
|
||||
int i, sum;
|
||||
|
||||
p = malloc (N * sizeof (str_t));
|
||||
|
||||
if (p == NULL)
|
||||
return 0;
|
||||
for (i = 0; i < N; i++)
|
||||
p[i].b = i;
|
||||
|
||||
@ -30,5 +39,5 @@ main ()
|
||||
}
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
/* { dg-final-use { scan-ipa-dump "Number of structures to transform is 1" "ipa_struct_reorg" } } */
|
||||
/* { dg-final-use { scan-ipa-dump "Number of structures to transform is 1" "ipa_struct_reorg" { xfail { "avr-*-*" } } } } */
|
||||
/* { dg-final-use { cleanup-ipa-dump "*" } } */
|
||||
|
@ -5,7 +5,15 @@ typedef struct
|
||||
float b;
|
||||
}str_t;
|
||||
|
||||
#ifdef STACK_SIZE
|
||||
#if STACK_SIZE > 8000
|
||||
#define N 1000
|
||||
#else
|
||||
#define N (STACK_SIZE/8)
|
||||
#endif
|
||||
#else
|
||||
#define N 1000
|
||||
#endif
|
||||
|
||||
int
|
||||
main ()
|
||||
@ -26,5 +34,5 @@ main ()
|
||||
}
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
/* { dg-final-use { scan-ipa-dump "Number of structures to transform is 1" "ipa_struct_reorg" } } */
|
||||
/* { dg-final-use { scan-ipa-dump "Number of structures to transform is 1" "ipa_struct_reorg" { xfail { "avr-*-*" } } } } */
|
||||
/* { dg-final-use { cleanup-ipa-dump "*" } } */
|
||||
|
@ -5,7 +5,15 @@ typedef struct
|
||||
float b;
|
||||
}str_t;
|
||||
|
||||
#ifdef STACK_SIZE
|
||||
#if STACK_SIZE > 8000
|
||||
#define N 1000
|
||||
#else
|
||||
#define N (STACK_SIZE/8)
|
||||
#endif
|
||||
#else
|
||||
#define N 1000
|
||||
#endif
|
||||
|
||||
int
|
||||
main ()
|
||||
@ -13,7 +21,8 @@ main ()
|
||||
int i, sum;
|
||||
|
||||
str_t * p = malloc (N * sizeof (str_t));
|
||||
|
||||
if (p == NULL)
|
||||
return 0;
|
||||
for (i = 0; i < N; i++)
|
||||
p[i].b = i;
|
||||
|
||||
|
@ -26,6 +26,6 @@ main ()
|
||||
}
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
/* { dg-final-use { scan-ipa-dump "Number of structures to transform is 1" "ipa_struct_reorg" } } */
|
||||
/* { dg-final-use { scan-ipa-dump "Number of structures to transform is 1" "ipa_struct_reorg" { xfail { "avr-*-*" } } } } */
|
||||
/* { dg-final-use { cleanup-ipa-dump "*" } } */
|
||||
|
||||
|
@ -12,7 +12,15 @@ typedef struct
|
||||
float d;
|
||||
}str_t2;
|
||||
|
||||
#ifdef STACK_SIZE
|
||||
#if STACK_SIZE > 16000
|
||||
#define N 1000
|
||||
#else
|
||||
#define N (STACK_SIZE/16)
|
||||
#endif
|
||||
#else
|
||||
#define N 1000
|
||||
#endif
|
||||
|
||||
str_t1 *p1;
|
||||
str_t2 *p2;
|
||||
@ -33,7 +41,7 @@ main ()
|
||||
int i, r;
|
||||
|
||||
r = rand ();
|
||||
num = r > N ? N : num;
|
||||
num = r > N ? N : r;
|
||||
p1 = malloc (num * sizeof (str_t1));
|
||||
p2 = malloc (num * sizeof (str_t2));
|
||||
|
||||
|
@ -23,5 +23,5 @@ int main()
|
||||
}
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
/* { dg-final { scan-ipa-dump "Number of structures to transform is 1" "ipa_struct_reorg" } } */
|
||||
/* { dg-final { scan-ipa-dump "Number of structures to transform is 1" "ipa_struct_reorg" { xfail { "avr-*-*" } } } } */
|
||||
/* { dg-final { cleanup-ipa-dump "*" } } */
|
||||
|
@ -8,7 +8,15 @@ typedef struct
|
||||
float b;
|
||||
}str_t;
|
||||
|
||||
#ifdef STACK_SIZE
|
||||
#if STACK_SIZE > 8000
|
||||
#define N 1000
|
||||
#else
|
||||
#define N (STACK_SIZE/8)
|
||||
#endif
|
||||
#else
|
||||
#define N 1000
|
||||
#endif
|
||||
|
||||
int
|
||||
main ()
|
||||
|
@ -26,5 +26,5 @@ int main()
|
||||
}
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
/* { dg-final { scan-ipa-dump "Number of structures to transform is 1" "ipa_struct_reorg" } } */
|
||||
/* { dg-final { scan-ipa-dump "Number of structures to transform is 1" "ipa_struct_reorg" { xfail { "avr-*-*" } } } } */
|
||||
/* { dg-final { cleanup-ipa-dump "*" } } */
|
||||
|
@ -9,7 +9,15 @@ struct str
|
||||
float b;
|
||||
};
|
||||
|
||||
#ifdef STACK_SIZE
|
||||
#if STACK_SIZE > 8000
|
||||
#define N 1000
|
||||
#else
|
||||
#define N (STACK_SIZE/8)
|
||||
#endif
|
||||
#else
|
||||
#define N 1000
|
||||
#endif
|
||||
|
||||
int
|
||||
foo (struct str * p_str)
|
||||
@ -25,7 +33,8 @@ main ()
|
||||
{
|
||||
int i, sum;
|
||||
struct str * p = malloc (N * sizeof (struct str));
|
||||
|
||||
if (p == NULL)
|
||||
return 0;
|
||||
for (i = 0; i < N; i++)
|
||||
sum = foo (p+i);
|
||||
|
||||
|
@ -8,7 +8,15 @@ typedef struct
|
||||
float b;
|
||||
}str_t;
|
||||
|
||||
#ifdef STACK_SIZE
|
||||
#if STACK_SIZE > 16000
|
||||
#define N 1000
|
||||
#else
|
||||
#define N (STACK_SIZE/16)
|
||||
#endif
|
||||
#else
|
||||
#define N 1000
|
||||
#endif
|
||||
|
||||
typedef struct
|
||||
{
|
||||
|
@ -8,7 +8,16 @@ typedef struct
|
||||
float b;
|
||||
}str_t;
|
||||
|
||||
#ifdef STACK_SIZE
|
||||
#if STACK_SIZE > 8000
|
||||
#define N 1000
|
||||
#else
|
||||
#define N (STACK_SIZE/8)
|
||||
#endif
|
||||
#else
|
||||
#define N 1000
|
||||
#endif
|
||||
|
||||
|
||||
typedef struct
|
||||
{
|
||||
|
@ -29,5 +29,5 @@ main ()
|
||||
}
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
/* { dg-final { scan-ipa-dump "Number of structures to transform is 1" "ipa_struct_reorg" } } */
|
||||
/* { dg-final { scan-ipa-dump "Number of structures to transform is 1" "ipa_struct_reorg" { xfail { "avr-*-*" } } } } */
|
||||
/* { dg-final { cleanup-ipa-dump "*" } } */
|
||||
|
@ -8,7 +8,15 @@ typedef struct
|
||||
float b;
|
||||
}str_t;
|
||||
|
||||
#ifdef STACK_SIZE
|
||||
#if STACK_SIZE > 8000
|
||||
#define N 1000
|
||||
#else
|
||||
#define N (STACK_SIZE/8)
|
||||
#endif
|
||||
#else
|
||||
#define N 1000
|
||||
#endif
|
||||
|
||||
str_t *p;
|
||||
|
||||
@ -18,7 +26,8 @@ main ()
|
||||
int i, sum;
|
||||
|
||||
p = malloc (N * sizeof (str_t));
|
||||
|
||||
if (p == NULL)
|
||||
return 0;
|
||||
for (i = 0; i < N; i++)
|
||||
p[i].b = i;
|
||||
|
||||
@ -33,5 +42,5 @@ main ()
|
||||
}
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
/* { dg-final { scan-ipa-dump "Number of structures to transform is 1" "ipa_struct_reorg" } } */
|
||||
/* { dg-final { scan-ipa-dump "Number of structures to transform is 1" "ipa_struct_reorg" { xfail { "avr-*-*" } } } } */
|
||||
/* { dg-final { cleanup-ipa-dump "*" } } */
|
||||
|
@ -8,7 +8,15 @@ typedef struct
|
||||
float b;
|
||||
}str_t;
|
||||
|
||||
#ifdef STACK_SIZE
|
||||
#if STACK_SIZE > 8000
|
||||
#define N 1000
|
||||
#else
|
||||
#define N (STACK_SIZE/8)
|
||||
#endif
|
||||
#else
|
||||
#define N 1000
|
||||
#endif
|
||||
|
||||
int
|
||||
main ()
|
||||
@ -29,5 +37,5 @@ main ()
|
||||
}
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
/* { dg-final { scan-ipa-dump "Number of structures to transform is 1" "ipa_struct_reorg" } } */
|
||||
/* { dg-final { scan-ipa-dump "Number of structures to transform is 1" "ipa_struct_reorg" { xfail { "avr-*-*" } } } } */
|
||||
/* { dg-final { cleanup-ipa-dump "*" } } */
|
||||
|
@ -8,7 +8,15 @@ typedef struct
|
||||
float b;
|
||||
}str_t;
|
||||
|
||||
#ifdef STACK_SIZE
|
||||
#if STACK_SIZE > 8000
|
||||
#define N 1000
|
||||
#else
|
||||
#define N (STACK_SIZE/8)
|
||||
#endif
|
||||
#else
|
||||
#define N 1000
|
||||
#endif
|
||||
|
||||
int
|
||||
main ()
|
||||
@ -16,7 +24,8 @@ main ()
|
||||
int i, sum;
|
||||
|
||||
str_t * p = malloc (N * sizeof (str_t));
|
||||
|
||||
if (p == NULL)
|
||||
return 0;
|
||||
for (i = 0; i < N; i++)
|
||||
p[i].b = i;
|
||||
|
||||
@ -31,5 +40,5 @@ main ()
|
||||
}
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
/* { dg-final { scan-ipa-dump "Number of structures to transform is 1" "ipa_struct_reorg" } } */
|
||||
/* { dg-final { scan-ipa-dump "Number of structures to transform is 1" "ipa_struct_reorg" { xfail { "avr-*-*" } } } } */
|
||||
/* { dg-final { cleanup-ipa-dump "*" } } */
|
||||
|
@ -8,26 +8,35 @@ typedef struct
|
||||
float b;
|
||||
}str_t;
|
||||
|
||||
#ifdef STACK_SIZE
|
||||
#if STACK_SIZE > 8000
|
||||
#define N 1000
|
||||
#else
|
||||
#define N (STACK_SIZE/8)
|
||||
#endif
|
||||
#else
|
||||
#define N 1000
|
||||
#endif
|
||||
|
||||
int
|
||||
main ()
|
||||
{
|
||||
int i, num;
|
||||
|
||||
num = rand();
|
||||
num = rand();
|
||||
num = num > N ? N : num;
|
||||
str_t * p = malloc (num * sizeof (str_t));
|
||||
|
||||
if (p == 0)
|
||||
return 0;
|
||||
|
||||
for (i = 0; i < N; i++)
|
||||
for (i = 0; i < num; i++)
|
||||
p[i].b = i;
|
||||
|
||||
for (i = 0; i < N; i++)
|
||||
for (i = 0; i < num; i++)
|
||||
p[i].a = p[i].b + 1;
|
||||
|
||||
for (i = 0; i < N; i++)
|
||||
for (i = 0; i < num; i++)
|
||||
if (p[i].a != p[i].b + 1)
|
||||
abort ();
|
||||
|
||||
@ -35,5 +44,5 @@ main ()
|
||||
}
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
/* { dg-final { scan-ipa-dump "Number of structures to transform is 1" "ipa_struct_reorg" } } */
|
||||
/* { dg-final { scan-ipa-dump "Number of structures to transform is 1" "ipa_struct_reorg" { xfail { "avr-*-*" } } } } */
|
||||
/* { dg-final { cleanup-ipa-dump "*" } } */
|
||||
|
@ -10,14 +10,23 @@ typedef struct
|
||||
float d;
|
||||
}str_t;
|
||||
|
||||
#ifdef STACK_SIZE
|
||||
#if STACK_SIZE > 1600
|
||||
#define N 100
|
||||
#else
|
||||
#define N (STACK_SIZE/16)
|
||||
#endif
|
||||
#else
|
||||
#define N 100
|
||||
#endif
|
||||
|
||||
int
|
||||
main ()
|
||||
{
|
||||
int i;
|
||||
str_t *p = malloc (N * sizeof (str_t));
|
||||
|
||||
if (p == NULL)
|
||||
return 0;
|
||||
for (i = 0; i < N; i++)
|
||||
p[i].a = 5;
|
||||
|
||||
|
@ -29,5 +29,5 @@ main ()
|
||||
}
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
/* { dg-final { scan-ipa-dump "Number of structures to transform is 1" "ipa_struct_reorg" } } */
|
||||
/* { dg-final { scan-ipa-dump "Number of structures to transform is 1" "ipa_struct_reorg" { xfail { "avr-*-*" } } } } */
|
||||
/* { dg-final { cleanup-ipa-dump "*" } } */
|
||||
|
@ -29,5 +29,5 @@ main ()
|
||||
}
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
/* { dg-final { scan-ipa-dump "No structures to transform" "ipa_struct_reorg" } } */
|
||||
/* { dg-final { scan-ipa-dump "No structures to transform" "ipa_struct_reorg" { xfail { "avr-*-*" } } } } */
|
||||
/* { dg-final { cleanup-ipa-dump "*" } } */
|
||||
|
@ -15,7 +15,15 @@ typedef struct
|
||||
float d;
|
||||
}str_t2;
|
||||
|
||||
#ifdef STACK_SIZE
|
||||
#if STACK_SIZE > 16000
|
||||
#define N 1000
|
||||
#else
|
||||
#define N (STACK_SIZE/16)
|
||||
#endif
|
||||
#else
|
||||
#define N 1000
|
||||
#endif
|
||||
|
||||
str_t1 *p1;
|
||||
str_t2 *p2;
|
||||
@ -36,7 +44,7 @@ main ()
|
||||
int i, r;
|
||||
|
||||
r = rand ();
|
||||
num = r > N ? N : num;
|
||||
num = r > N ? N : r;
|
||||
p1 = malloc (num * sizeof (str_t1));
|
||||
p2 = malloc (num * sizeof (str_t2));
|
||||
|
||||
@ -56,5 +64,5 @@ main ()
|
||||
}
|
||||
|
||||
/*--------------------------------------------------------------------------*/
|
||||
/* { dg-final { scan-ipa-dump "Number of structures to transform is 2" "ipa_struct_reorg" } } */
|
||||
/* { dg-final { scan-ipa-dump "Number of structures to transform is 2" "ipa_struct_reorg" { xfail { "avr-*-*" } } } } */
|
||||
/* { dg-final { cleanup-ipa-dump "*" } } */
|
||||
|
Loading…
Reference in New Issue
Block a user