From 3ce5437aca23ccf168dcf44594316142732faf7e Mon Sep 17 00:00:00 2001 From: Andrew Pinski Date: Sun, 18 Jan 2004 15:45:51 +0000 Subject: [PATCH] rs6000.c (rs6000_special_round_type_align): Check for NULL in the chain and remove repeated code. 2004-01-18 Andrew Pinski * config/rs6000/rs6000.c (rs6000_special_round_type_align): Check for NULL in the chain and remove repeated code. From-SVN: r76105 --- gcc/ChangeLog | 5 +++++ gcc/config/rs6000/rs6000.c | 6 ++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index a7db3f7ba909..affc9265881e 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2004-01-18 Andrew Pinski + + * config/rs6000/rs6000.c (rs6000_special_round_type_align): + Check for NULL in the chain and remove repeated code. + 2004-01-18 Jan Hubicka * coverage.c (checksum_string): Rename to ... diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c index 2dead2c9b18f..e19b0076d4f6 100644 --- a/gcc/config/rs6000/rs6000.c +++ b/gcc/config/rs6000/rs6000.c @@ -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); -- 2.43.5