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]

[PATCH] - fix segfault in decode_rtx_const for vector consts


decode_rtx_const segfaults on non-zero vector consts because
value->un.addr.base is overriden by CONST_VECTOR and means nothing in
that case.
Solution is not to check it not only for RTX_DOUBLE but for RTX_VECTOR
as well.


======= ChangeLog entry =======

2002-09-06  Igor Shevlyakov <igor@microunity.com>

	* varasm.c (decode_rtx_const): Don't check undefined field for
CONST_VECTOR 

======= patch ===============

Index: varasm.c
===================================================================
RCS file: /cvsroot/gcc/gcc/gcc/varasm.c,v
retrieving revision 1.306
diff -c -3 -p -r1.306 varasm.c
*** varasm.c    4 Sep 2002 23:59:56 -0000       1.306
--- varasm.c    6 Sep 2002 21:39:01 -0000
*************** decode_rtx_const (mode, x, value)
*** 3047,3053 ****
        }
      }
  
!   if (value->kind > RTX_DOUBLE && value->un.addr.base != 0)
      switch (GET_CODE (value->un.addr.base))
        {
  #if 0
--- 3047,3053 ----
        }
      }
  
!   if (value->kind > RTX_VECTOR && value->un.addr.base != 0)
      switch (GET_CODE (value->un.addr.base))
        {
  #if 0


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