builtins.c (c_strlen): Treat an offset too large for a HOST_WIDE_INT as out of range.
* builtins.c (c_strlen): Treat an offset too large for a HOST_WIDE_INT as out of range. From-SVN: r45550
This commit is contained in:
parent
4262e6231a
commit
1de3d87705
@ -1,3 +1,8 @@
|
||||
2001-10-11 Matt Kraai <kraai@alumni.carnegiemellon.edu>
|
||||
|
||||
* builtins.c (c_strlen): Treat an offset too large for a
|
||||
HOST_WIDE_INT as out of range.
|
||||
|
||||
Tue Sep 11 18:57:47 CEST 2001 Jan Hubicka <jh@suse.cz>
|
||||
|
||||
* basic-block.h (EDGE_CRITICAL): Remove; renumber other flags.
|
||||
|
@ -265,8 +265,10 @@ c_strlen (src)
|
||||
|
||||
/* We have a known offset into the string. Start searching there for
|
||||
a null character if we can represent it as a single HOST_WIDE_INT. */
|
||||
if (offset_node == 0 || ! host_integerp (offset_node, 0))
|
||||
if (offset_node == 0)
|
||||
offset = 0;
|
||||
else if (! host_integerp (offset_node, 0))
|
||||
offset = -1;
|
||||
else
|
||||
offset = tree_low_cst (offset_node, 0);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user