From 28f155be0a63e8c65a10ba0074d12586d87e82bc Mon Sep 17 00:00:00 2001 From: Giovanni Bajo Date: Sat, 23 Jul 2005 23:36:40 +0200 Subject: [PATCH] re PR target/22577 (PA bootstrap fails) PR target/22577 * config/pa/pa.c (reloc_needed): Updated for VECs inside CONSTRUCTOR. From-SVN: r102314 --- gcc/ChangeLog | 5 +++++ gcc/config/pa/pa.c | 10 ++++++---- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 36588ee8431..56b1d933023 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2005-07-23 Giovanni Bajo + + PR target/22577 + * config/pa/pa.c (reloc_needed): Updated for VECs inside CONSTRUCTOR. + 2005-07-23 Kaveh R. Ghazi * Makefile.in (C_TREE_H): Update dependencies. diff --git a/gcc/config/pa/pa.c b/gcc/config/pa/pa.c index b354ab08f09..ffe6708d319 100644 --- a/gcc/config/pa/pa.c +++ b/gcc/config/pa/pa.c @@ -1998,10 +1998,12 @@ reloc_needed (tree exp) case CONSTRUCTOR: { - register tree link; - for (link = CONSTRUCTOR_ELTS (exp); link; link = TREE_CHAIN (link)) - if (TREE_VALUE (link) != 0) - reloc |= reloc_needed (TREE_VALUE (link)); + tree value; + unsigned HOST_WIDE_INT ix; + + FOR_EACH_CONSTRUCTOR_VALUE (CONSTRUCTOR_ELTS (exp), ix, value) + if (value) + reloc |= reloc_needed (value); } break; -- 2.30.2