OSDN Git Service

2004-01-18 Andrew Pinski <pinskia@physics.uc.edu>
authorpinskia <pinskia@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 18 Jan 2004 15:45:51 +0000 (15:45 +0000)
committerpinskia <pinskia@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 18 Jan 2004 15:45:51 +0000 (15:45 +0000)
        * config/rs6000/rs6000.c (rs6000_special_round_type_align):
        Check for NULL in the chain and remove repeated code.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@76105 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/config/rs6000/rs6000.c

index a7db3f7..affc926 100644 (file)
@@ -1,3 +1,8 @@
+2004-01-18  Andrew Pinski  <pinskia@physics.uc.edu>
+
+       * config/rs6000/rs6000.c (rs6000_special_round_type_align):
+       Check for NULL in the chain and remove repeated code.
+
 2004-01-18  Jan Hubicka  <jh@suse.cz>
 
        * coverage.c (checksum_string): Rename to ...
index 2dead2c..e19b007 100644 (file)
@@ -2325,15 +2325,13 @@ unsigned int
 rs6000_special_round_type_align (tree type, int computed, int specified)
 {
   tree field = TYPE_FIELDS (type);
-  if (!field)
-    return MAX (computed, specified);
 
   /* Skip all the static variables only if ABI is greater than
      1 or equal to 0.   */
-  while (TREE_CODE (field) == VAR_DECL)
+  while (field != NULL && TREE_CODE (field) == VAR_DECL)
     field = TREE_CHAIN (field);
 
-  if (field == type || DECL_MODE (field) != DFmode)
+  if (field == NULL || field == type || DECL_MODE (field) != DFmode)
     return MAX (computed, specified);
 
   return MAX (MAX (computed, specified), 64);