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]

patch for building 4.3.2 with Irix /usr/WorkShop/usr/bin/ncc


This patch is enough to build gcc-core-4.3.2.tar.gz
  with SGI IRIX 6.5 /usr/WorkShop/usr/bin/ncc,
  which is an old version of EDG, producing "O32" binaries.

This compiler seems to come "free"/"standard" on Irix,
so the point is to bootstrap from an earlier state.

Using the resulting compiler to build itself *almost* works.
It incurs the following fatal problems:
 unresolved symbols linking:
   a) stuff in libgcc; libgcc is relatively empty; I will investigate

   b) two missing symbols in gmp/mpfr; I will investigate.
   These are suspicious since they occurred in the first go 'round
   and I applied a patch to gmp/mpfr. In particular, this compiler doesn't
   like it when .c files #include themselves like remquo.c does.
   Anyway, that's not a gcc issue.
  

I could see the combine.c part being rejected and trying
for a better workaround, as well as the whole thing being
rejected until it fully works, though it is mostly trivial.
Possibly the obstack casts should be made "more correct",
but this diff was generated via fairly dumb code.


Is there a define for "building a bootstrap compiler (from a lame predecessor)"?

Could someone with write access commit?

config was:

  $ /src/gccrel/configure -host mips-sgi-irix6.5 -target mips-sgi-irix6.5 -verbo
se -prefix=/usr/local -exec-prefix=/usr/local -libdir=/usr/local/lib -libexecdir
=/usr/local/lib -mandir=/usr/local/share/man -infodir=/usr/local/share/info -dis
able-nls -disable-intl -disable-po -with-gnu-as -with-gnu-ld -disable-bootstrap
-enable-rpath -enable-cld -enable-version-specific-runtime-libs -disable-checking
-disable-win32-registry -enable-64-bit-bfd -disable-multilib -disable-shared
-enable-static -disable-libgomp -disable-libssp CC=/usr/WorkShop/usr/bin/ncc -w
-disable-dependency-tracking -enable-languages=c -disable-shared -enable-static
MAKEINFO=: CFLAGS=-g CFLAGS_FOR_BUILD=-g BOOT_CFLAGS=-g CXXFLAGS=-g
CXXFLAGS_FOR_BUILD=-g FCFLAGS=-g GNATLIBCFLAGS=-g


I'm using the system ld/gas -- hm..the config line disagrees.
I had a problem with GNU ld.
Maybe that explains the remaining problems.


diff -r -u /src/gcc-4.3.2/gcc/bt-load.c /src/gccrel/gcc/bt-load.c
--- /src/gcc-4.3.2/gcc/bt-load.c	Wed Sep  5 03:49:01 2007
+++ /src/gccrel/gcc/bt-load.c	Mon Oct 13 15:34:35 2008
@@ -279,7 +279,7 @@
 
       if (!this_group)
 	{
-	  this_group = obstack_alloc (&migrate_btrl_obstack,
+	  this_group = (void *) obstack_alloc (&migrate_btrl_obstack,
 				      sizeof (struct btr_def_group_s));
 	  this_group->src = def_src;
 	  this_group->members = NULL;
@@ -303,7 +303,7 @@
 	     btr_def_group *all_btr_def_groups)
 {
   btr_def this
-    = obstack_alloc (&migrate_btrl_obstack, sizeof (struct btr_def_s));
+    = (void *) obstack_alloc (&migrate_btrl_obstack, sizeof (struct btr_def_s));
   this->bb = bb;
   this->luid = insn_luid;
   this->insn = insn;
@@ -354,7 +354,7 @@
 	usep = NULL;
     }
   use = usep ? *usep : NULL_RTX;
-  user = obstack_alloc (&migrate_btrl_obstack, sizeof (struct btr_user_s));
+  user = (void *) obstack_alloc (&migrate_btrl_obstack, sizeof (struct btr_user_s));
   user->bb = bb;
   user->luid = insn_luid;
   user->insn = insn;

diff -r -u /src/gcc-4.3.2/gcc/c-parser.c /src/gccrel/gcc/c-parser.c
--- /src/gcc-4.3.2/gcc/c-parser.c	Thu Apr  3 13:24:28 2008
+++ /src/gccrel/gcc/c-parser.c	Mon Oct 13 15:34:38 2008
@@ -1075,7 +1075,7 @@
     }
   else
     {
-      void *obstack_position = obstack_alloc (&parser_obstack, 0);
+      void *obstack_position = (void *) obstack_alloc (&parser_obstack, 0);
       do
 	{
 	  ggc_collect ();

diff -r -u /src/gcc-4.3.2/gcc/cfg.c /src/gccrel/gcc/cfg.c
--- /src/gcc-4.3.2/gcc/cfg.c	Wed Jan 16 08:32:05 2008
+++ /src/gccrel/gcc/cfg.c	Mon Oct 13 15:34:38 2008
@@ -730,7 +730,7 @@
 {
   /* Verify that aux field is clear.  */
   gcc_assert (!bb->aux && first_block_aux_obj);
-  bb->aux = obstack_alloc (&block_aux_obstack, size);
+  bb->aux = (void *) obstack_alloc (&block_aux_obstack, size);
   memset (bb->aux, 0, size);
 }
 
@@ -751,7 +751,7 @@
     /* Check whether AUX data are still allocated.  */
     gcc_assert (!first_block_aux_obj);
 
-  first_block_aux_obj = obstack_alloc (&block_aux_obstack, 0);
+  first_block_aux_obj = (void *) obstack_alloc (&block_aux_obstack, 0);
   if (size)
     {
       basic_block bb;
@@ -793,7 +793,7 @@
 {
   /* Verify that aux field is clear.  */
   gcc_assert (!e->aux && first_edge_aux_obj);
-  e->aux = obstack_alloc (&edge_aux_obstack, size);
+  e->aux = (void *) obstack_alloc (&edge_aux_obstack, size);
   memset (e->aux, 0, size);
 }
 
@@ -814,7 +814,7 @@
     /* Check whether AUX data are still allocated.  */
     gcc_assert (!first_edge_aux_obj);
 
-  first_edge_aux_obj = obstack_alloc (&edge_aux_obstack, 0);
+  first_edge_aux_obj = (void *) obstack_alloc (&edge_aux_obstack, 0);
   if (size)
     {
       basic_block bb;

diff -r -u /src/gcc-4.3.2/gcc/collect2.c /src/gccrel/gcc/collect2.c
--- /src/gcc-4.3.2/gcc/collect2.c	Mon Dec 31 07:02:59 2007
+++ /src/gccrel/gcc/collect2.c	Mon Oct 13 15:34:39 2008
@@ -879,7 +879,7 @@
 #endif
 
   obstack_begin (&temporary_obstack, 0);
-  temporary_firstobj = obstack_alloc (&temporary_obstack, 0);
+  temporary_firstobj = (void *) obstack_alloc (&temporary_obstack, 0);
 
 #ifndef HAVE_LD_DEMANGLE
   current_demangling_style = auto_demangling;

diff -r -u /src/gcc-4.3.2/gcc/combine.c /src/gccrel/gcc/combine.c
--- /src/gcc-4.3.2/gcc/combine.c	Mon May 19 16:29:29 2008
+++ /src/gccrel/gcc/combine.c	Mon Oct 13 15:34:34 2008
@@ -2201,6 +2201,9 @@
 static rtx
 try_combine (rtx i3, rtx i2, rtx i1, int *new_direct_jump_p)
 {
+#if !defined(__GNUC__) && defined(_ABIO32) /* Irix /usr/WorkShop/usr/bin/ncc has trouble preprocessing in this function. */
+  return 0;
+#else
   /* New patterns for I3 and I2, respectively.  */
   rtx newpat, newi2pat = 0;
   rtvec newpat_vec_with_clobbers = 0;
@@ -3826,6 +3829,7 @@
     return added_links_insn;
   else
     return newi2pat ? i2 : i3;
+#endif
 }
 
 /* Undo all the modifications recorded in undobuf.  */
@@ -3884,6 +3888,9 @@
    try_combine will call this function to see if an insn can be split into
    two insns.  */
 
+#if !defined(__GNUC__) && defined(_ABIO32) /* Irix /usr/WorkShop/usr/bin/ncc has trouble preprocessing in this function. */
+/* nothing */
+#else
 static rtx *
 find_split_point (rtx *loc, rtx insn)
 {
@@ -4288,6 +4295,7 @@
       return 0;
     }
 }
+#endif
 
 /* Throughout X, replace FROM with TO, and return the result.
    The result is TO if X is FROM;
@@ -4593,6 +4601,9 @@
 static rtx
 combine_simplify_rtx (rtx x, enum machine_mode op0_mode, int in_dest)
 {
+#if !defined(__GNUC__) && defined(_ABIO32) /* Irix /usr/WorkShop/usr/bin/ncc has trouble preprocessing in this function. */
+  return x;
+#else
   enum rtx_code code = GET_CODE (x);
   enum machine_mode mode = GET_MODE (x);
   rtx temp;
@@ -5267,6 +5278,7 @@
     }
 
   return x;
+#endif
 }
 
 /* Simplify X, an IF_THEN_ELSE expression.  Return the new expression.  */
@@ -6255,6 +6267,9 @@
 static const_rtx
 expand_field_assignment (const_rtx x)
 {
+#if !defined(__GNUC__) && defined(_ABIO32) /* Irix /usr/WorkShop/usr/bin/ncc has trouble preprocessing in this function. */
+  return x;
+#else
   rtx inner;
   rtx pos;			/* Always counts from low bit.  */
   int len;
@@ -6373,6 +6388,7 @@
     }
 
   return x;
+#endif
 }
 
 /* Return an RTX for a reference to LEN bits of INNER.  If POS_RTX is nonzero,

diff -r -u /src/gcc-4.3.2/gcc/fix-header.c /src/gccrel/gcc/fix-header.c
--- /src/gcc-4.3.2/gcc/fix-header.c	Thu Jul 26 01:37:01 2007
+++ /src/gccrel/gcc/fix-header.c	Mon Oct 13 15:34:39 2008
@@ -562,7 +562,7 @@
   /* We only have a partial function declaration,
      so remember that we have to add a complete prototype.  */
   partial_count++;
-  partial = obstack_alloc (&scan_file_obstack, sizeof (struct partial_proto));
+  partial = (void *) obstack_alloc (&scan_file_obstack, sizeof (struct partial_proto));
   partial->line_seen = line;
   partial->fn = fn;
   fn->partial = partial;

diff -r -u /src/gcc-4.3.2/gcc/gcse.c /src/gccrel/gcc/gcse.c
--- /src/gcc-4.3.2/gcc/gcse.c	Fri May  9 11:26:57 2008
+++ /src/gccrel/gcc/gcse.c	Mon Oct 13 15:34:41 2008
@@ -1102,7 +1102,7 @@
       reg_set_table_size = new_size;
     }
 
-  new_reg_info = obstack_alloc (®_set_obstack, sizeof (struct reg_set));
+  new_reg_info = (void *) obstack_alloc (®_set_obstack, sizeof (struct reg_set));
   bytes_used += sizeof (struct reg_set);
   new_reg_info->bb_index = BLOCK_NUM (insn);
   new_reg_info->next = reg_set_table[regno];

diff -r -u /src/gcc-4.3.2/gcc/genattrtab.c /src/gccrel/gcc/genattrtab.c
--- /src/gcc-4.3.2/gcc/genattrtab.c	Wed Oct 17 12:47:12 2007
+++ /src/gccrel/gcc/genattrtab.c	Mon Oct 13 15:34:42 2008
@@ -326,7 +326,7 @@
 {
   struct attr_hash *h;
 
-  h = obstack_alloc (hash_obstack, sizeof (struct attr_hash));
+  h = (void *) obstack_alloc (hash_obstack, sizeof (struct attr_hash));
   h->hashcode = hashcode;
   h->u.rtl = rtl;
   h->next = attr_hash_table[hashcode % RTL_HASH_SIZE];
@@ -340,7 +340,7 @@
 {
   struct attr_hash *h;
 
-  h = obstack_alloc (hash_obstack, sizeof (struct attr_hash));
+  h = (void *) obstack_alloc (hash_obstack, sizeof (struct attr_hash));
   h->hashcode = -hashcode;
   h->u.str = str;
   h->next = attr_hash_table[hashcode % RTL_HASH_SIZE];
@@ -601,7 +601,7 @@
       return h->u.str;			/* <-- return if found.  */
 
   /* Not found; create a permanent copy and add it to the hash table.  */
-  new_str = obstack_alloc (hash_obstack, len + 1);
+  new_str = (void *) obstack_alloc (hash_obstack, len + 1);
   memcpy (new_str, str, len);
   new_str[len] = '\0';
   attr_hash_add_string (hashcode, new_str);
@@ -1297,7 +1297,7 @@
 	    || insn_alternatives[av->first_insn->def->insn_code]))
       return av;
 
-  av = oballoc (sizeof (struct attr_value));
+  av = (void *) oballoc (sizeof (struct attr_value));
   av->value = value;
   av->next = attr->first_value;
   attr->first_value = av;
@@ -1440,7 +1440,7 @@
       else
 	av = get_attr_value (value, attr, id->insn_code);
 
-      ie = oballoc (sizeof (struct insn_ent));
+      ie = (void *) oballoc (sizeof (struct insn_ent));
       ie->def = id;
       insert_insn_ent (av, ie);
     }
@@ -1571,7 +1571,7 @@
 							 no_address_fn[i],
 							 address_fn[i]),
 				     new_attr, ie->def->insn_code);
-	    new_ie = oballoc (sizeof (struct insn_ent));
+	    new_ie = (void *) oballoc (sizeof (struct insn_ent));
 	    new_ie->def = ie->def;
 	    insert_insn_ent (new_av, new_ie);
 	  }
@@ -2949,7 +2949,7 @@
       name_ptr = XSTR (exp, 1);
       while ((p = next_comma_elt (&name_ptr)) != NULL)
 	{
-	  av = oballoc (sizeof (struct attr_value));
+	  av = (void *) oballoc (sizeof (struct attr_value));
 	  av->value = attr_rtx (CONST_STRING, p);
 	  av->next = attr->first_value;
 	  attr->first_value = av;
@@ -3062,7 +3062,7 @@
 {
   struct insn_def *id;
 
-  id = oballoc (sizeof (struct insn_def));
+  id = (void *) oballoc (sizeof (struct insn_def));
   id->next = defs;
   defs = id;
   id->def = exp;
@@ -3126,7 +3126,7 @@
 	have_annul_false = 1;
     }
 
-  delay = oballoc (sizeof (struct delay_desc));
+  delay = (void *) oballoc (sizeof (struct delay_desc));
   delay->def = def;
   delay->num = ++num_delays;
   delay->next = delays;
@@ -4158,7 +4158,7 @@
   if (! create)
     return NULL;
 
-  attr = oballoc (sizeof (struct attr_desc));
+  attr = (void *) oballoc (sizeof (struct attr_desc));
   attr->name = DEF_ATTR_STRING (name);
   attr->first_value = attr->default_val = NULL;
   attr->is_numeric = attr->is_const = attr->is_special = 0;
@@ -4297,7 +4297,7 @@
 static void
 gen_insn_reserv (rtx def)
 {
-  struct insn_reserv *decl = oballoc (sizeof (struct insn_reserv));
+  struct insn_reserv *decl = (void *) oballoc (sizeof (struct insn_reserv));
 
   decl->name            = DEF_ATTR_STRING (XSTR (def, 0));
   decl->default_latency = XINT (def, 1);
@@ -4338,7 +4338,7 @@
     if (s == b->insn)
       return;  /* already got that one */
 
-  b = oballoc (sizeof (struct bypass_list));
+  b = (void *) oballoc (sizeof (struct bypass_list));
   b->insn = s;
   b->next = all_bypasses;
   all_bypasses = b;
@@ -4544,13 +4544,13 @@
   printf ("#define operands recog_data.operand\n\n");
 
   /* Make `insn_alternatives'.  */
-  insn_alternatives = oballoc (insn_code_number * sizeof (int));
+  insn_alternatives = (void *) oballoc (insn_code_number * sizeof (int));
   for (id = defs; id; id = id->next)
     if (id->insn_code>= 0)
       insn_alternatives[id->insn_code] = (1 << id->num_alternatives) - 1;
 
   /* Make `insn_n_alternatives'.  */
-  insn_n_alternatives = oballoc (insn_code_number * sizeof (int));
+  insn_n_alternatives = (void *) oballoc (insn_code_number * sizeof (int));
   for (id = defs; id; id = id->next)
     if (id->insn_code>= 0)
       insn_n_alternatives[id->insn_code] = id->num_alternatives;

diff -r -u /src/gcc-4.3.2/gcc/genautomata.c /src/gccrel/gcc/genautomata.c
--- /src/gcc-4.3.2/gcc/genautomata.c	Wed Aug 22 08:07:10 2007
+++ /src/gccrel/gcc/genautomata.c	Mon Oct 13 15:34:44 2008
@@ -1394,7 +1394,7 @@
 	    : (final_p
 	       ? "invalid second string `%s' in final_absence_set"
 	       : "invalid second string `%s' in absence_set")), XSTR (def, 1));
-  str_patterns = obstack_alloc (&irp, patterns_length * sizeof (char **));
+  str_patterns = (void *) obstack_alloc (&irp, patterns_length * sizeof (char **));
   for (i = 0; i < patterns_length; i++)
     {
       str_patterns [i] = get_str_vect (str_pattern_lists [i],

diff -r -u /src/gcc-4.3.2/gcc/genpreds.c /src/gccrel/gcc/genpreds.c
--- /src/gcc-4.3.2/gcc/genpreds.c	Thu Jul 26 01:37:01 2007
+++ /src/gccrel/gcc/genpreds.c	Mon Oct 13 15:34:45 2008
@@ -894,7 +894,7 @@
     }
 
   
-  c = obstack_alloc (rtl_obstack, sizeof (struct constraint_data));
+  c = (void *) obstack_alloc (rtl_obstack, sizeof (struct constraint_data));
   c->name = name;
   c->c_name = need_mangled_name ? mangle (name) : name;
   c->lineno = lineno;

diff -r -u /src/gcc-4.3.2/gcc/regrename.c /src/gccrel/gcc/regrename.c
--- /src/gcc-4.3.2/gcc/regrename.c	Sat Sep  8 19:23:47 2007
+++ /src/gccrel/gcc/regrename.c	Mon Oct 13 15:34:45 2008
@@ -189,7 +189,7 @@
   memset (tick, 0, sizeof tick);
 
   gcc_obstack_init (&rename_obstack);
-  first_obj = obstack_alloc (&rename_obstack, 0);
+  first_obj = (void *) obstack_alloc (&rename_obstack, 0);
 
   FOR_EACH_BB (bb)
     {
@@ -386,7 +386,7 @@
       if (type == OP_OUT)
 	{
 	  struct du_chain *this
-	    = obstack_alloc (&rename_obstack, sizeof (struct du_chain));
+	    = (void *) obstack_alloc (&rename_obstack, sizeof (struct du_chain));
 	  this->next_use = 0;
 	  this->next_chain = open_chains;
 	  this->loc = loc;
@@ -438,7 +438,7 @@
 		 be replaced with, terminate the chain.  */
 	      if (cl != NO_REGS)
 		{
-		  this = obstack_alloc (&rename_obstack, sizeof (struct du_chain));
+		  this = (void *) obstack_alloc (&rename_obstack, sizeof (struct du_chain));
 		  this->next_use = 0;
 		  this->next_chain = (*p)->next_chain;
 		  this->loc = loc;

diff -r -u /src/gcc-4.3.2/gcc/reload1.c /src/gccrel/gcc/reload1.c
--- /src/gcc-4.3.2/gcc/reload1.c	Mon Oct 22 12:28:23 2007
+++ /src/gccrel/gcc/reload1.c	Mon Oct 13 15:34:47 2008
@@ -499,7 +499,7 @@
 
   /* Initialize obstack for our rtl allocation.  */
   gcc_obstack_init (&reload_obstack);
-  reload_startobj = obstack_alloc (&reload_obstack, 0);
+  reload_startobj = (void *) obstack_alloc (&reload_obstack, 0);
 
   INIT_REG_SET (&spilled_pseudos);
   INIT_REG_SET (&pseudos_counted);
@@ -516,7 +516,7 @@
 
   if (unused_insn_chains == 0)
     {
-      c = obstack_alloc (&reload_obstack, sizeof (struct insn_chain));
+      c = (void *) obstack_alloc (&reload_obstack, sizeof (struct insn_chain));
       INIT_REG_SET (&c->live_throughout);
       INIT_REG_SET (&c->dead_or_set);
     }
@@ -711,7 +711,7 @@
 
   failure = 0;
 
-  reload_firstobj = obstack_alloc (&reload_obstack, 0);
+  reload_firstobj = (void *) obstack_alloc (&reload_obstack, 0);
 
   /* Make sure that the last insn in the chain
      is not something that needs reloading.  */
@@ -1032,7 +1032,7 @@
 	{
 	  save_call_clobbered_regs ();
 	  /* That might have allocated new insn_chain structures.  */
-	  reload_firstobj = obstack_alloc (&reload_obstack, 0);
+	  reload_firstobj = (void *) obstack_alloc (&reload_obstack, 0);
 	}
 
       calculate_needs_all_insns (global);
@@ -1504,10 +1504,10 @@
 copy_reloads (struct insn_chain *chain)
 {
   chain->n_reloads = n_reloads;
-  chain->rld = obstack_alloc (&reload_obstack,
+  chain->rld = (void *) obstack_alloc (&reload_obstack,
 			      n_reloads * sizeof (struct reload));
   memcpy (chain->rld, rld, n_reloads * sizeof (struct reload));
-  reload_insn_firstobj = obstack_alloc (&reload_obstack, 0);
+  reload_insn_firstobj = (void *) obstack_alloc (&reload_obstack, 0);
 }
 
 /* Walk the chain of insns, and determine for each whether it needs reloads
@@ -1521,7 +1521,7 @@
 
   something_needs_elimination = 0;
 
-  reload_insn_firstobj = obstack_alloc (&reload_obstack, 0);
+  reload_insn_firstobj = (void *) obstack_alloc (&reload_obstack, 0);
   for (chain = reload_insn_chain; chain != 0; chain = next)
     {
       rtx insn = chain->insn;

diff -r -u /src/gcc-4.3.2/gcc/reorg.c /src/gccrel/gcc/reorg.c
--- /src/gcc-4.3.2/gcc/reorg.c	Sat Nov 24 14:15:54 2007
+++ /src/gccrel/gcc/reorg.c	Mon Oct 13 15:34:48 2008
@@ -3842,7 +3842,7 @@
   if (unfilled_firstobj == 0)
     {
       gcc_obstack_init (&unfilled_slots_obstack);
-      unfilled_firstobj = obstack_alloc (&unfilled_slots_obstack, 0);
+      unfilled_firstobj = (void *) obstack_alloc (&unfilled_slots_obstack, 0);
     }
 
   for (insn = next_active_insn (first); insn; insn = next_active_insn (insn))
@@ -3917,7 +3917,7 @@
   obstack_free (&unfilled_slots_obstack, unfilled_firstobj);
 
   /* It is not clear why the line below is needed, but it does seem to be.  */
-  unfilled_firstobj = obstack_alloc (&unfilled_slots_obstack, 0);
+  unfilled_firstobj = (void *) obstack_alloc (&unfilled_slots_obstack, 0);
 
   if (dump_file)
     {

diff -r -u /src/gcc-4.3.2/gcc/tlink.c /src/gccrel/gcc/tlink.c
--- /src/gcc-4.3.2/gcc/tlink.c	Thu Jul 26 01:37:01 2007
+++ /src/gccrel/gcc/tlink.c	Mon Oct 13 15:34:48 2008
@@ -193,7 +193,7 @@
 static void
 symbol_push (symbol *p)
 {
-  struct symbol_stack_entry *ep = obstack_alloc
+  struct symbol_stack_entry *ep = (void *) obstack_alloc
     (&symbol_stack_obstack, sizeof (struct symbol_stack_entry));
   ep->value = p;
   ep->next = symbol_stack;
@@ -221,7 +221,7 @@
   if (p->tweaking)
     return;
 
-  ep = obstack_alloc
+  ep = (void *) obstack_alloc
     (&file_stack_obstack, sizeof (struct file_stack_entry));
   ep->value = p;
   ep->next = file_stack;

diff -r -u /src/gcc-4.3.2/gcc/tree-sra.c /src/gccrel/gcc/tree-sra.c
--- /src/gcc-4.3.2/gcc/tree-sra.c	Tue Feb 12 10:35:05 2008
+++ /src/gccrel/gcc/tree-sra.c	Mon Oct 13 15:34:49 2008
@@ -591,7 +591,7 @@
   elt = *slot;
   if (!elt && insert == INSERT)
     {
-      *slot = elt = obstack_alloc (&sra_obstack, sizeof (*elt));
+      *slot = elt = (void *) obstack_alloc (&sra_obstack, sizeof (*elt));
       memset (elt, 0, sizeof (*elt));
 
       elt->parent = parent;

diff -r -u /src/gcc-4.3.2/gcc/tree-ssa-loop-ivopts.c /src/gccrel/gcc/tree-ssa-loop-ivopts.c
--- /src/gcc-4.3.2/gcc/tree-ssa-loop-ivopts.c	Thu Jul  3 15:03:54 2008
+++ /src/gccrel/gcc/tree-ssa-loop-ivopts.c	Mon Oct 13 15:34:25 2008
@@ -4286,7 +4286,9 @@
 static comp_cost
 iv_ca_cost (struct iv_ca *ivs)
 {
-  return (ivs->bad_uses ? infinite_cost : ivs->cost);
+  if (ivs->bad_uses)
+    return infinite_cost;
+  return ivs->cost;
 }
 
 /* Returns true if all dependences of CP are among invariants in IVS.  */

 
Thanks,
 - Jay


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