patch fix typo in gcse.c

grahams grahams@rcp.co.uk
Wed Mar 1 12:21:00 GMT 2000


All

Here's a patch for dump_hash_table () in gcse.c
which I believe fixes an obvious typo (i.e.
replaces expr with flat_table[i]) and adds
a check for a NULL entry in flat_table[] before
using it.

Grahame

ChangeLog
	* gcse.c (dump_hash_table): Correct typo and check for NULL

Patch

---------------------------------------------------------------
*** gcse.c	Wed Mar  1 20:01:21 2000
--- gcse.c.new	Wed Mar  1 20:01:35 2000
*************** dump_hash_table (file, name, table, tabl
*** 2010,2019 ****
  
    for (i = 0; i < total_size; i++)
      {
!       fprintf (file, "Index %d (hash value %d)\n  ",
! 	       expr->bitmap_index, hash_val[i]);
!       print_rtl (file, flat_table[i]->expr);
!       fprintf (file, "\n");
      }
  
    fprintf (file, "\n");
--- 2010,2022 ----
  
    for (i = 0; i < total_size; i++)
      {
!       if (flat_table[i] != NULL)
! 	{
! 	  fprintf (file, "Index %d (hash value %d)\n  ",
! 		   flat_table[i]->bitmap_index, hash_val[i]);
! 	  print_rtl (file, flat_table[i]->expr);
! 	  fprintf (file, "\n");
! 	}
      }
  
    fprintf (file, "\n");
-----------------------------------------------------------------------


More information about the Gcc-patches mailing list