public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* PATCH: PR bootstrap/30510: Gcc failed to bootstrap
@ 2007-01-20  2:33 H. J. Lu
  2007-01-23 14:02 ` H. J. Lu
  0 siblings, 1 reply; 3+ messages in thread
From: H. J. Lu @ 2007-01-20  2:33 UTC (permalink / raw)
  To: gcc-patches

This patch initializes 2 variables before using them. Works on
Linux/x86-64.


H.J.
----
cp/

2007-01-19  H.J. Lu  <hongjiu.lu@intel.com>

	PR bootstrap/30510
	* parser.c (cp_parser_class_specifier): Initialize bases.

fortran/

2007-01-19  H.J. Lu  <hongjiu.lu@intel.com>

	PR bootstrap/30510
	* resolve.c (resolve_function): Initialize name.

--- gcc/cp/parser.c.foo	2007-01-11 07:48:10.000000000 -0800
+++ gcc/cp/parser.c	2007-01-19 10:53:15.000000000 -0800
@@ -13203,7 +13203,7 @@ cp_parser_class_specifier (cp_parser* pa
   bool saved_in_function_body;
   tree old_scope = NULL_TREE;
   tree scope = NULL_TREE;
-  tree bases;
+  tree bases = NULL_TREE;
 
   push_deferring_access_checks (dk_no_deferred);
 
--- gcc/fortran/resolve.c.foo	2007-01-18 10:42:36.000000000 -0800
+++ gcc/fortran/resolve.c	2007-01-19 10:56:44.000000000 -0800
@@ -1538,7 +1538,7 @@ resolve_function (gfc_expr * expr)
 {
   gfc_actual_arglist *arg;
   gfc_symbol * sym;
-  const char *name;
+  const char *name = NULL;
   try t;
   int temp;
   procedure_type p = PROC_INTRINSIC;


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: PATCH: PR bootstrap/30510: Gcc failed to bootstrap
  2007-01-20  2:33 PATCH: PR bootstrap/30510: Gcc failed to bootstrap H. J. Lu
@ 2007-01-23 14:02 ` H. J. Lu
  2007-02-05 16:47   ` Meissner, Michael
  0 siblings, 1 reply; 3+ messages in thread
From: H. J. Lu @ 2007-01-23 14:02 UTC (permalink / raw)
  To: gcc-patches

On Fri, Jan 19, 2007 at 06:33:10PM -0800, H. J. Lu wrote:
> This patch initializes 2 variables before using them. Works on
> Linux/x86-64.
> 

This is the updated patch.

H.J.
----
cp/

2007-01-19  H.J. Lu  <hongjiu.lu@intel.com>

	PR bootstrap/30510
	* parser.c (cp_parser_class_specifier): Initialize bases.

fortran/

2007-01-19  H.J. Lu  <hongjiu.lu@intel.com>

	PR bootstrap/30510
	* resolve.c (resolve_function): Initialize name.

--- gcc/cp/parser.c.uninit	2007-01-11 07:48:10.000000000 -0800
+++ gcc/cp/parser.c	2007-01-22 07:54:29.000000000 -0800
@@ -13203,7 +13203,7 @@ cp_parser_class_specifier (cp_parser* pa
   bool saved_in_function_body;
   tree old_scope = NULL_TREE;
   tree scope = NULL_TREE;
-  tree bases;
+  tree bases = NULL_TREE;
 
   push_deferring_access_checks (dk_no_deferred);
 
--- gcc/fortran/resolve.c.uninit	2007-01-22 07:51:32.000000000 -0800
+++ gcc/fortran/resolve.c	2007-01-22 07:55:39.000000000 -0800
@@ -1524,7 +1524,7 @@ resolve_function (gfc_expr *expr)
 {
   gfc_actual_arglist *arg;
   gfc_symbol *sym;
-  const char *name;
+  const char *name = NULL;
   try t;
   int temp;
   procedure_type p = PROC_INTRINSIC;

^ permalink raw reply	[flat|nested] 3+ messages in thread

* RE: PATCH: PR bootstrap/30510: Gcc failed to bootstrap
  2007-01-23 14:02 ` H. J. Lu
@ 2007-02-05 16:47   ` Meissner, Michael
  0 siblings, 0 replies; 3+ messages in thread
From: Meissner, Michael @ 2007-02-05 16:47 UTC (permalink / raw)
  To: H. J. Lu, gcc-patches; +Cc: Harle, Christophe

> -----Original Message-----
> From: gcc-patches-owner@gcc.gnu.org
[mailto:gcc-patches-owner@gcc.gnu.org]
> On Behalf Of H. J. Lu
> Sent: Tuesday, January 23, 2007 9:02 AM
> To: gcc-patches@gcc.gnu.org
> Subject: Re: PATCH: PR bootstrap/30510: Gcc failed to bootstrap
> 
> On Fri, Jan 19, 2007 at 06:33:10PM -0800, H. J. Lu wrote:
> > This patch initializes 2 variables before using them. Works on
> > Linux/x86-64.
> >
> 
> This is the updated patch.
> 
> H.J.
> ----
> cp/

OK.  Though in both cases, it is safe, since the address is passed into
a function which always initializes it before use.

--
Michael Meissner
AMD, MS 83-29
90 Central Street
Boxborough, MA 01719



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2007-02-05 16:47 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-01-20  2:33 PATCH: PR bootstrap/30510: Gcc failed to bootstrap H. J. Lu
2007-01-23 14:02 ` H. J. Lu
2007-02-05 16:47   ` Meissner, Michael

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).