aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorAndy Hutchinson <hutchinsonandy@aim.com>2008-09-08 22:41:27 +0000
committerAndy Hutchinson <hutchinsonandy@gcc.gnu.org>2008-09-08 22:41:27 +0000
commit564475d71fb78d1a6eaf34a81825018c9dd59477 (patch)
treef973e0244a11e9a84195c1a3871da73a7b5bafa2 /gcc
parentd70ddd9078f3591673e892174888b8b30d988554 (diff)
downloadgcc-564475d71fb78d1a6eaf34a81825018c9dd59477.zip
gcc-564475d71fb78d1a6eaf34a81825018c9dd59477.tar.gz
gcc-564475d71fb78d1a6eaf34a81825018c9dd59477.tar.bz2
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
Diffstat (limited to 'gcc')
-rw-r--r--gcc/testsuite/ChangeLog30
-rw-r--r--gcc/testsuite/gcc.dg/struct/w_prof_global_var.c13
-rw-r--r--gcc/testsuite/gcc.dg/struct/w_prof_local_array.c10
-rw-r--r--gcc/testsuite/gcc.dg/struct/w_prof_local_var.c11
-rw-r--r--gcc/testsuite/gcc.dg/struct/w_prof_single_str_global.c2
-rw-r--r--gcc/testsuite/gcc.dg/struct/w_prof_two_strs.c10
-rw-r--r--gcc/testsuite/gcc.dg/struct/wo_prof_array_field.c2
-rw-r--r--gcc/testsuite/gcc.dg/struct/wo_prof_array_through_pointer.c8
-rw-r--r--gcc/testsuite/gcc.dg/struct/wo_prof_double_malloc.c2
-rw-r--r--gcc/testsuite/gcc.dg/struct/wo_prof_escape_arg_to_local.c11
-rw-r--r--gcc/testsuite/gcc.dg/struct/wo_prof_escape_substr_pointer.c8
-rw-r--r--gcc/testsuite/gcc.dg/struct/wo_prof_escape_substr_value.c9
-rw-r--r--gcc/testsuite/gcc.dg/struct/wo_prof_global_array.c2
-rw-r--r--gcc/testsuite/gcc.dg/struct/wo_prof_global_var.c13
-rw-r--r--gcc/testsuite/gcc.dg/struct/wo_prof_local_array.c10
-rw-r--r--gcc/testsuite/gcc.dg/struct/wo_prof_local_var.c13
-rw-r--r--gcc/testsuite/gcc.dg/struct/wo_prof_malloc_size_var.c19
-rw-r--r--gcc/testsuite/gcc.dg/struct/wo_prof_mult_field_peeling.c11
-rw-r--r--gcc/testsuite/gcc.dg/struct/wo_prof_single_str_global.c2
-rw-r--r--gcc/testsuite/gcc.dg/struct/wo_prof_single_str_local.c2
-rw-r--r--gcc/testsuite/gcc.dg/struct/wo_prof_two_strs.c12
21 files changed, 175 insertions, 25 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 4a4afab..138351a 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -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.
diff --git a/gcc/testsuite/gcc.dg/struct/w_prof_global_var.c b/gcc/testsuite/gcc.dg/struct/w_prof_global_var.c
index 8f1ae75..c51648c4 100644
--- a/gcc/testsuite/gcc.dg/struct/w_prof_global_var.c
+++ b/gcc/testsuite/gcc.dg/struct/w_prof_global_var.c
@@ -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 "*" } } */
diff --git a/gcc/testsuite/gcc.dg/struct/w_prof_local_array.c b/gcc/testsuite/gcc.dg/struct/w_prof_local_array.c
index 6394d07..1a798e3 100644
--- a/gcc/testsuite/gcc.dg/struct/w_prof_local_array.c
+++ b/gcc/testsuite/gcc.dg/struct/w_prof_local_array.c
@@ -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 "*" } } */
diff --git a/gcc/testsuite/gcc.dg/struct/w_prof_local_var.c b/gcc/testsuite/gcc.dg/struct/w_prof_local_var.c
index c84863c..82f24a1 100644
--- a/gcc/testsuite/gcc.dg/struct/w_prof_local_var.c
+++ b/gcc/testsuite/gcc.dg/struct/w_prof_local_var.c
@@ -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;
diff --git a/gcc/testsuite/gcc.dg/struct/w_prof_single_str_global.c b/gcc/testsuite/gcc.dg/struct/w_prof_single_str_global.c
index db9372e..6a717dd 100644
--- a/gcc/testsuite/gcc.dg/struct/w_prof_single_str_global.c
+++ b/gcc/testsuite/gcc.dg/struct/w_prof_single_str_global.c
@@ -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 "*" } } */
diff --git a/gcc/testsuite/gcc.dg/struct/w_prof_two_strs.c b/gcc/testsuite/gcc.dg/struct/w_prof_two_strs.c
index aca646a..308c30e 100644
--- a/gcc/testsuite/gcc.dg/struct/w_prof_two_strs.c
+++ b/gcc/testsuite/gcc.dg/struct/w_prof_two_strs.c
@@ -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));
diff --git a/gcc/testsuite/gcc.dg/struct/wo_prof_array_field.c b/gcc/testsuite/gcc.dg/struct/wo_prof_array_field.c
index 1c41de5..12c217a 100644
--- a/gcc/testsuite/gcc.dg/struct/wo_prof_array_field.c
+++ b/gcc/testsuite/gcc.dg/struct/wo_prof_array_field.c
@@ -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 "*" } } */
diff --git a/gcc/testsuite/gcc.dg/struct/wo_prof_array_through_pointer.c b/gcc/testsuite/gcc.dg/struct/wo_prof_array_through_pointer.c
index 0746019..303afb7 100644
--- a/gcc/testsuite/gcc.dg/struct/wo_prof_array_through_pointer.c
+++ b/gcc/testsuite/gcc.dg/struct/wo_prof_array_through_pointer.c
@@ -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 ()
diff --git a/gcc/testsuite/gcc.dg/struct/wo_prof_double_malloc.c b/gcc/testsuite/gcc.dg/struct/wo_prof_double_malloc.c
index 27503f8..b1508ee 100644
--- a/gcc/testsuite/gcc.dg/struct/wo_prof_double_malloc.c
+++ b/gcc/testsuite/gcc.dg/struct/wo_prof_double_malloc.c
@@ -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 "*" } } */
diff --git a/gcc/testsuite/gcc.dg/struct/wo_prof_escape_arg_to_local.c b/gcc/testsuite/gcc.dg/struct/wo_prof_escape_arg_to_local.c
index b120a79..43ca58b 100644
--- a/gcc/testsuite/gcc.dg/struct/wo_prof_escape_arg_to_local.c
+++ b/gcc/testsuite/gcc.dg/struct/wo_prof_escape_arg_to_local.c
@@ -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);
diff --git a/gcc/testsuite/gcc.dg/struct/wo_prof_escape_substr_pointer.c b/gcc/testsuite/gcc.dg/struct/wo_prof_escape_substr_pointer.c
index fcb10e3..8e54632 100644
--- a/gcc/testsuite/gcc.dg/struct/wo_prof_escape_substr_pointer.c
+++ b/gcc/testsuite/gcc.dg/struct/wo_prof_escape_substr_pointer.c
@@ -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
{
diff --git a/gcc/testsuite/gcc.dg/struct/wo_prof_escape_substr_value.c b/gcc/testsuite/gcc.dg/struct/wo_prof_escape_substr_value.c
index 49283a5..bade315 100644
--- a/gcc/testsuite/gcc.dg/struct/wo_prof_escape_substr_value.c
+++ b/gcc/testsuite/gcc.dg/struct/wo_prof_escape_substr_value.c
@@ -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
{
diff --git a/gcc/testsuite/gcc.dg/struct/wo_prof_global_array.c b/gcc/testsuite/gcc.dg/struct/wo_prof_global_array.c
index 1254281..4ffd4b5 100644
--- a/gcc/testsuite/gcc.dg/struct/wo_prof_global_array.c
+++ b/gcc/testsuite/gcc.dg/struct/wo_prof_global_array.c
@@ -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 "*" } } */
diff --git a/gcc/testsuite/gcc.dg/struct/wo_prof_global_var.c b/gcc/testsuite/gcc.dg/struct/wo_prof_global_var.c
index a38dd58..58790bf 100644
--- a/gcc/testsuite/gcc.dg/struct/wo_prof_global_var.c
+++ b/gcc/testsuite/gcc.dg/struct/wo_prof_global_var.c
@@ -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 "*" } } */
diff --git a/gcc/testsuite/gcc.dg/struct/wo_prof_local_array.c b/gcc/testsuite/gcc.dg/struct/wo_prof_local_array.c
index 28d66e4..3d92da4 100644
--- a/gcc/testsuite/gcc.dg/struct/wo_prof_local_array.c
+++ b/gcc/testsuite/gcc.dg/struct/wo_prof_local_array.c
@@ -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 "*" } } */
diff --git a/gcc/testsuite/gcc.dg/struct/wo_prof_local_var.c b/gcc/testsuite/gcc.dg/struct/wo_prof_local_var.c
index 65b3197..5a778a7 100644
--- a/gcc/testsuite/gcc.dg/struct/wo_prof_local_var.c
+++ b/gcc/testsuite/gcc.dg/struct/wo_prof_local_var.c
@@ -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 "*" } } */
diff --git a/gcc/testsuite/gcc.dg/struct/wo_prof_malloc_size_var.c b/gcc/testsuite/gcc.dg/struct/wo_prof_malloc_size_var.c
index 7e80bab..04b8b66 100644
--- a/gcc/testsuite/gcc.dg/struct/wo_prof_malloc_size_var.c
+++ b/gcc/testsuite/gcc.dg/struct/wo_prof_malloc_size_var.c
@@ -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 "*" } } */
diff --git a/gcc/testsuite/gcc.dg/struct/wo_prof_mult_field_peeling.c b/gcc/testsuite/gcc.dg/struct/wo_prof_mult_field_peeling.c
index df2b4ee..8f116df 100644
--- a/gcc/testsuite/gcc.dg/struct/wo_prof_mult_field_peeling.c
+++ b/gcc/testsuite/gcc.dg/struct/wo_prof_mult_field_peeling.c
@@ -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;
diff --git a/gcc/testsuite/gcc.dg/struct/wo_prof_single_str_global.c b/gcc/testsuite/gcc.dg/struct/wo_prof_single_str_global.c
index 5569deb..81c3edf 100644
--- a/gcc/testsuite/gcc.dg/struct/wo_prof_single_str_global.c
+++ b/gcc/testsuite/gcc.dg/struct/wo_prof_single_str_global.c
@@ -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 "*" } } */
diff --git a/gcc/testsuite/gcc.dg/struct/wo_prof_single_str_local.c b/gcc/testsuite/gcc.dg/struct/wo_prof_single_str_local.c
index 65a9602..f9cb7d5 100644
--- a/gcc/testsuite/gcc.dg/struct/wo_prof_single_str_local.c
+++ b/gcc/testsuite/gcc.dg/struct/wo_prof_single_str_local.c
@@ -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 "*" } } */
diff --git a/gcc/testsuite/gcc.dg/struct/wo_prof_two_strs.c b/gcc/testsuite/gcc.dg/struct/wo_prof_two_strs.c
index 5fb152a..24dae55 100644
--- a/gcc/testsuite/gcc.dg/struct/wo_prof_two_strs.c
+++ b/gcc/testsuite/gcc.dg/struct/wo_prof_two_strs.c
@@ -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 "*" } } */