From: Richard Kenner Date: Thu, 6 May 1993 09:45:47 +0000 (-0400) Subject: (decode_field_reference): Don't do anything for non-integral fields. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=772ae9f018e47a61c32568babd238c4df4b8f521;p=gcc.git (decode_field_reference): Don't do anything for non-integral fields. From-SVN: r4353 --- diff --git a/gcc/fold-const.c b/gcc/fold-const.c index 28a6a760c10..6570ac2a62d 100644 --- a/gcc/fold-const.c +++ b/gcc/fold-const.c @@ -2418,6 +2418,12 @@ decode_field_reference (exp, pbitsize, pbitpos, pmode, punsignedp, tree inner; tree offset; + /* All the optimizations using this function assume integer fields. + There are problems with FP fields since the type_for_size call + below can fail for, e.g., XFmode. */ + if (! INTEGRAL_TYPE_P (TREE_TYPE (exp))) + return 0; + STRIP_NOPS (exp); if (TREE_CODE (exp) == BIT_AND_EXPR)