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]

[Committed 4.3] Backport patch for uninitialized structures in tests


The attached backport to the 4.3 branch fixes the failure of these
tests on hppa*-*-hpux*.  Tested on hppa2.0w-hp-hpux11.11.

Dave
-- 
J. David Anglin                                  dave.anglin@nrc-cnrc.gc.ca
National Research Council of Canada              (613) 990-0752 (FAX: 952-6602)

2008-11-09  John David Anglin  <dave.anglin@nrc-cnrc.gc.ca>

	Backport from mainline:
	2008-04-22  Steve Ellcey  <sje@cup.hp.com>

	* gcc.dg/struct/wo_prof_global_var.c: Initialize array.
	* gcc.dg/struct/wo_prof_malloc_size_var.c: Ditto.
	* gcc.dg/struct/w_prof_local_var.c: Ditto.
	* gcc.dg/struct/w_prof_global_var.c: Ditto.
	* gcc.dg/struct/wo_prof_local_var.c: Ditto.

Index: gcc.dg/struct/wo_prof_global_var.c
===================================================================
--- gcc.dg/struct/wo_prof_global_var.c	(revision 134548)
+++ gcc.dg/struct/wo_prof_global_var.c	(working copy)
@@ -18,6 +18,10 @@ main ()
   int i, sum;
 
   p = malloc (N * sizeof (str_t));
+
+  for (i = 0; i < N; i++)
+    p[i].b = i;
+
   for (i = 0; i < N; i++)
     p[i].a = p[i].b + 1;
 
Index: gcc.dg/struct/wo_prof_malloc_size_var.c
===================================================================
--- gcc.dg/struct/wo_prof_malloc_size_var.c	(revision 134548)
+++ gcc.dg/struct/wo_prof_malloc_size_var.c	(working copy)
@@ -22,6 +22,9 @@ main ()
     return 0;
 
   for (i = 0; i < N; i++)
+    p[i].b = i;
+
+  for (i = 0; i < N; i++)
     p[i].a = p[i].b + 1;
 
   for (i = 0; i < N; i++)
Index: gcc.dg/struct/w_prof_local_var.c
===================================================================
--- gcc.dg/struct/w_prof_local_var.c	(revision 134548)
+++ gcc.dg/struct/w_prof_local_var.c	(working copy)
@@ -13,6 +13,10 @@ main ()
   int i, sum;
 
   str_t * p = malloc (N * sizeof (str_t));
+
+  for (i = 0; i < N; i++)
+    p[i].b = i;
+
   for (i = 0; i < N; i++)
     p[i].a = p[i].b + 1;
 
Index: gcc.dg/struct/w_prof_global_var.c
===================================================================
--- gcc.dg/struct/w_prof_global_var.c	(revision 134548)
+++ gcc.dg/struct/w_prof_global_var.c	(working copy)
@@ -15,6 +15,10 @@ main ()
   int i, sum;
 
   p = malloc (N * sizeof (str_t));
+
+  for (i = 0; i < N; i++)
+    p[i].b = i;
+
   for (i = 0; i < N; i++)
     p[i].a = p[i].b + 1;
 
Index: gcc.dg/struct/wo_prof_local_var.c
===================================================================
--- gcc.dg/struct/wo_prof_local_var.c	(revision 134548)
+++ gcc.dg/struct/wo_prof_local_var.c	(working copy)
@@ -16,6 +16,10 @@ main ()
   int i, sum;
 
   str_t * p = malloc (N * sizeof (str_t));
+
+  for (i = 0; i < N; i++)
+    p[i].b = i;
+
   for (i = 0; i < N; i++)
     p[i].a = p[i].b + 1;
 


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