diff options
author | Paul Thomas <pault@gcc.gnu.org> | 2009-07-21 04:51:30 +0000 |
---|---|---|
committer | Paul Thomas <pault@gcc.gnu.org> | 2009-07-21 04:51:30 +0000 |
commit | 309e9930efb67cd497365b487ff3f66b4d178e8f (patch) | |
tree | 3788d167fcc76815d634acbfc48c8773ce67ce86 /gcc | |
parent | 7fa94fbb93a68190133b41905db29bc00b820b7f (diff) | |
download | gcc-309e9930efb67cd497365b487ff3f66b4d178e8f.zip gcc-309e9930efb67cd497365b487ff3f66b4d178e8f.tar.gz gcc-309e9930efb67cd497365b487ff3f66b4d178e8f.tar.bz2 |
re PR fortran/40726 (miscompilation at -O1)
2009-07-21 Paul Thomas <pault@gcc.gnu.org>
PR fortran/40726
* trans-decl.c (gfc_get_extern_function_decl): Do not set
DECL_IS_MALLOC for pointer valued functions.
(build_function_decl): The same.
From-SVN: r149846
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/fortran/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/fortran/trans-decl.c | 13 |
2 files changed, 7 insertions, 13 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index fcf194a..ebd8a4c 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,10 @@ +2009-07-21 Paul Thomas <pault@gcc.gnu.org> + + PR fortran/40726 + * trans-decl.c (gfc_get_extern_function_decl): Do not set + DECL_IS_MALLOC for pointer valued functions. + (build_function_decl): The same. + 2009-07-19 Steven G. Kargl <kargl@gcc.gnu.org> PR fortran/40727 diff --git a/gcc/fortran/trans-decl.c b/gcc/fortran/trans-decl.c index 5133888..fa25782 100644 --- a/gcc/fortran/trans-decl.c +++ b/gcc/fortran/trans-decl.c @@ -1423,12 +1423,6 @@ gfc_get_extern_function_decl (gfc_symbol * sym) FUNCTION_DECL, name, type); SET_DECL_ASSEMBLER_NAME (fndecl, mangled_name); - /* If the return type is a pointer, avoid alias issues by setting - DECL_IS_MALLOC to nonzero. This means that the function should be - treated as if it were a malloc, meaning it returns a pointer that - is not an alias. */ - if (POINTER_TYPE_P (type)) - DECL_IS_MALLOC (fndecl) = 1; /* Set the context of this decl. */ if (0 && sym->ns && sym->ns->proc_name) @@ -1559,13 +1553,6 @@ build_function_decl (gfc_symbol * sym) /* Don't call layout_decl for a RESULT_DECL. layout_decl (result_decl, 0); */ - /* If the return type is a pointer, avoid alias issues by setting - DECL_IS_MALLOC to nonzero. This means that the function should be - treated as if it were a malloc, meaning it returns a pointer that - is not an alias. */ - if (POINTER_TYPE_P (type)) - DECL_IS_MALLOC (fndecl) = 1; - /* Set up all attributes for the function. */ DECL_CONTEXT (fndecl) = current_function_decl; DECL_EXTERNAL (fndecl) = 0; |