diff options
| author | loewis <loewis@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-03-17 09:11:17 +0000 |
|---|---|---|
| committer | loewis <loewis@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-03-17 09:11:17 +0000 |
| commit | 4a53ef87997433856d33847536c7b994bfc91c3c (patch) | |
| tree | a18b85b8268fd7d336f378776d0453c2bf1571ad /gcc | |
| parent | 3d0fd24bf5346937d6f29e04745b7816d9a1c29c (diff) | |
| download | ppe42-gcc-4a53ef87997433856d33847536c7b994bfc91c3c.tar.gz ppe42-gcc-4a53ef87997433856d33847536c7b994bfc91c3c.zip | |
* call.c (special_function_p): It is only malloc if it returns
Pmode.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@32604 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
| -rw-r--r-- | gcc/ChangeLog | 5 | ||||
| -rw-r--r-- | gcc/calls.c | 7 |
2 files changed, 9 insertions, 3 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 7f1fc13882c..09dffc1d613 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -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. diff --git a/gcc/calls.c b/gcc/calls.c index 7ae7b3d60f3..6a4c1484ffc 100644 --- a/gcc/calls.c +++ b/gcc/calls.c @@ -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; } } |

