diff options
author | Richard Kenner <kenner@gcc.gnu.org> | 1993-05-06 05:45:47 -0400 |
---|---|---|
committer | Richard Kenner <kenner@gcc.gnu.org> | 1993-05-06 05:45:47 -0400 |
commit | 772ae9f018e47a61c32568babd238c4df4b8f521 (patch) | |
tree | 1197b1423157d5ca40182ea6de1065633155e624 /gcc | |
parent | 8e7e536500c31b0d3b8890d5aee90c9f644138da (diff) | |
download | gcc-772ae9f018e47a61c32568babd238c4df4b8f521.zip gcc-772ae9f018e47a61c32568babd238c4df4b8f521.tar.gz gcc-772ae9f018e47a61c32568babd238c4df4b8f521.tar.bz2 |
(decode_field_reference): Don't do anything for non-integral fields.
From-SVN: r4353
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/fold-const.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/fold-const.c b/gcc/fold-const.c index 28a6a76..6570ac2 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) |