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]

[tree-ssa] fix alpha bootstrap


Work around something questionable in alpha's __builtin_va_list.
There's got to be a better way to avoid the -Wpadding warning...


r~


        * tree-sra.c (lookup_scalar): Handle unnamed fields.

Index: tree-sra.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/Attic/tree-sra.c,v
retrieving revision 1.1.2.18
diff -c -p -d -r1.1.2.18 tree-sra.c
*** tree-sra.c	9 Feb 2004 02:03:48 -0000	1.1.2.18
--- tree-sra.c	10 Feb 2004 21:49:53 -0000
*************** lookup_scalar (struct sra_elt *key, tree
*** 196,207 ****
        *res = *key;
        res->replace = make_temp (type, "SR");
  
!       if (DECL_NAME (key->base))
  	{
! 	  char *name;
  	  switch (key->kind)
  	    {
  	    case COMPONENT_REF:
  	      name = concat (IDENTIFIER_POINTER (DECL_NAME (key->base)),
  			     "$",
  			     IDENTIFIER_POINTER (DECL_NAME (key->field)),
--- 196,209 ----
        *res = *key;
        res->replace = make_temp (type, "SR");
  
!       if (DECL_NAME (key->base) && !DECL_IGNORED_P (key->base))
  	{
! 	  char *name = NULL;
  	  switch (key->kind)
  	    {
  	    case COMPONENT_REF:
+ 	      if (!DECL_NAME (key->field))
+ 		break;
  	      name = concat (IDENTIFIER_POINTER (DECL_NAME (key->base)),
  			     "$",
  			     IDENTIFIER_POINTER (DECL_NAME (key->field)),
*************** lookup_scalar (struct sra_elt *key, tree
*** 218,225 ****
  	    default:
  	      abort ();
  	    }
! 	  DECL_NAME (res->replace) = get_identifier (name);
! 	  free (name);
  	}
        DECL_SOURCE_LOCATION (res->replace) = DECL_SOURCE_LOCATION (key->base);
      }
--- 220,230 ----
  	    default:
  	      abort ();
  	    }
! 	  if (name)
! 	    {
! 	      DECL_NAME (res->replace) = get_identifier (name);
! 	      free (name);
! 	    }
  	}
        DECL_SOURCE_LOCATION (res->replace) = DECL_SOURCE_LOCATION (key->base);
      }


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