diff options
author | Andrew Pinski <andrew_pinski@playstation.sony.com> | 2008-07-05 19:37:48 +0000 |
---|---|---|
committer | Andrew Pinski <pinskia@gcc.gnu.org> | 2008-07-05 12:37:48 -0700 |
commit | 0e4b00d683943bc1620bb025149918f844e88d41 (patch) | |
tree | d2ce9d323f7a8369837c81bd35b927468c1790a0 /gcc/fold-const.c | |
parent | 6e1fab3d8762b9378311130f01687d925f2858a5 (diff) | |
download | gcc-0e4b00d683943bc1620bb025149918f844e88d41.zip gcc-0e4b00d683943bc1620bb025149918f844e88d41.tar.gz gcc-0e4b00d683943bc1620bb025149918f844e88d41.tar.bz2 |
ptrmemfield.C: New testcase.
2008-07-05 Andrew Pinski <andrew_pinski@playstation.sony.com>
* g++.dg/tree-ssa/ptrmemfield.C: New testcase.
2008-07-05 Andrew Pinski <andrew_pinski@playstation.sony.com>
* fold-const.c (fold_convert_const): Treat OFFSET_TYPE the same as
integral and pointer types.
From-SVN: r137510
Diffstat (limited to 'gcc/fold-const.c')
-rw-r--r-- | gcc/fold-const.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/fold-const.c b/gcc/fold-const.c index fc72b9b..e1e04bb 100644 --- a/gcc/fold-const.c +++ b/gcc/fold-const.c @@ -2396,7 +2396,8 @@ fold_convert_const (enum tree_code code, tree type, tree arg1) if (TREE_TYPE (arg1) == type) return arg1; - if (POINTER_TYPE_P (type) || INTEGRAL_TYPE_P (type)) + if (POINTER_TYPE_P (type) || INTEGRAL_TYPE_P (type) + || TREE_CODE (type) == OFFSET_TYPE) { if (TREE_CODE (arg1) == INTEGER_CST) return fold_convert_const_int_from_int (type, arg1); |