Commit 59ab1319 by Marek Polacek

re PR middle-end/78750 (ICE in get_range_info, at tree-ssanames.c:375)

	PR middle-end/78750
	* builtins.c (check_sizes): Use POINTER_TYPE_P.

	* g++.dg/torture/pr78750.C: New.

From-SVN: r243498
parent c915eee6
...@@ -3091,7 +3091,7 @@ check_sizes (int opt, tree exp, tree size, tree maxlen, tree str, tree objsize) ...@@ -3091,7 +3091,7 @@ check_sizes (int opt, tree exp, tree size, tree maxlen, tree str, tree objsize)
{ {
/* STR is normally a pointer to string but as a special case /* STR is normally a pointer to string but as a special case
it can be an integer denoting the length of a string. */ it can be an integer denoting the length of a string. */
if (TREE_CODE (TREE_TYPE (str)) == POINTER_TYPE) if (POINTER_TYPE_P (TREE_TYPE (str)))
{ {
/* Try to determine the range of lengths the source string /* Try to determine the range of lengths the source string
refers to. If it can be determined add one to it for refers to. If it can be determined add one to it for
......
// PR middle-end/78750
// { dg-do compile }
extern "C" char *strcpy (char *, const char *);
void
fn (char *p, char &as)
{
strcpy (p, &as);
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment