call.c (special_function_p): It is only malloc if it returns Pmode.

* call.c (special_function_p): It is only malloc if it returns
	Pmode.

From-SVN: r32604
This commit is contained in:
Martin v. Löwis 2000-03-17 09:11:17 +00:00 committed by Martin v. Löwis
parent 9dd8851b96
commit 91d024d568
2 changed files with 9 additions and 3 deletions

View File

@ -1,3 +1,8 @@
2000-03-17 Martin v. Löwis <loewis@informatik.hu-berlin.de>
* call.c (special_function_p): It is only malloc if it returns
Pmode.
2000-03-17 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
* config/c4x/c4x.h (ASM_SPEC, CPP_SPEC, LINK_SPEC): Support C33.

View File

@ -645,9 +645,10 @@ special_function_p (fndecl, returns_twice, is_longjmp, fork_or_exec,
C++ operator new is not suitable because it is not required
to return a unique pointer; indeed, the standard placement new
just returns its argument. */
else if (! strcmp (tname, "malloc")
|| ! strcmp (tname, "calloc")
|| ! strcmp (tname, "strdup"))
else if (TYPE_MODE (TREE_TYPE (TREE_TYPE (fndecl))) == Pmode
&& (! strcmp (tname, "malloc")
|| ! strcmp (tname, "calloc")
|| ! strcmp (tname, "strdup")))
*is_malloc = 1;
}
}