diff options
author | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-05-09 14:16:50 +0000 |
---|---|---|
committer | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-05-09 14:16:50 +0000 |
commit | b3acd74f838c7d20fc674546fd82c7e9dba9c585 (patch) | |
tree | e0ba9e9c343cc1cd57ef4f7f67500ebcf0e17982 /gcc/fold-const.c | |
parent | 34e61d776ce435000b57d778b41582cd14891a3f (diff) | |
download | gcc-b3acd74f838c7d20fc674546fd82c7e9dba9c585.tar.gz |
2006-05-09 Dirk Mueller <dmueller@suse.de>
Richard Guenther <rguenther@suse.de>
PR middle-end/27498
* fold-const.c (fold_read_from_constant_string): Relax check
for matching types to matching modes.
* gcc.dg/tree-ssa/pr27498.c: New testcase.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@113651 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/fold-const.c')
-rw-r--r-- | gcc/fold-const.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/fold-const.c b/gcc/fold-const.c index 567168276e1..26e53c0c32c 100644 --- a/gcc/fold-const.c +++ b/gcc/fold-const.c @@ -12220,7 +12220,7 @@ fold_read_from_constant_string (tree exp) } if (string - && TREE_TYPE (exp) == TREE_TYPE (TREE_TYPE (string)) + && TYPE_MODE (TREE_TYPE (exp)) == TYPE_MODE (TREE_TYPE (TREE_TYPE (string))) && TREE_CODE (string) == STRING_CST && TREE_CODE (index) == INTEGER_CST && compare_tree_int (index, TREE_STRING_LENGTH (string)) < 0 |