public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "fxcoudert at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug fortran/30723] Freeing memory doesn't need to call a library function
Date: Mon, 14 May 2007 19:34:00 -0000	[thread overview]
Message-ID: <20070514193411.1121.qmail@sourceware.org> (raw)
In-Reply-To: <bug-30723-10259@http.gcc.gnu.org/bugzilla/>



------- Comment #5 from fxcoudert at gcc dot gnu dot org  2007-05-14 20:34 -------
Subject: Bug 30723

Author: fxcoudert
Date: Mon May 14 19:33:57 2007
New Revision: 124721

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=124721
Log:
       PR fortran/30723

        * trans.h (gfor_fndecl_internal_malloc, gfor_fndecl_internal_malloc64,
        gfor_fndecl_internal_free): Remove prototypes.
        (gfor_fndecl_os_error, gfc_call_free, gfc_call_malloc): Add prototypes.
        * trans.c (gfc_call_malloc, gfc_call_free): New functions.
        * f95-lang.c (gfc_init_builtin_functions): Add __builtin_free
        and __builtin_malloc builtins.
        * trans-decl.c (gfor_fndecl_internal_malloc,
        gfor_fndecl_internal_malloc64, gfor_fndecl_internal_free): Remove.
        (gfor_fndecl_os_error): Add.
        (gfc_build_builtin_function_decls): Don't create internal_malloc,
        internal_malloc64 and internal_free library function declaration.
        Create os_error library call function declaration.
        * trans-array.c (gfc_trans_allocate_array_storage,
        gfc_trans_auto_array_allocation, gfc_trans_dummy_array_bias,
        gfc_conv_array_parameter, gfc_duplicate_allocatable): Use
        gfc_call_malloc and gfc_call_free instead of building calls to
        internal_malloc and internal_free.
        * trans-expr.c (gfc_conv_string_tmp): Likewise.
        * trans-stmt.c (gfc_do_allocate, gfc_trans_assign_need_temp,
        gfc_trans_pointer_assign_need_temp, gfc_trans_forall_1,
        gfc_trans_where_2: Likewise.
        * trans-intrinsic.c (gfc_conv_intrinsic_ctime,
        gfc_conv_intrinsic_fdate, gfc_conv_intrinsic_ttynam,
        gfc_conv_intrinsic_array_transfer, gfc_conv_intrinsic_trim): Likewise.

        * runtime/memory.c (internal_malloc, internal_malloc64,
        internal_free): Remove.
        * runtime/error.c (os_error): Export function.
        * intrinsics/move_alloc.c: Include stdlib.h.
        (move_alloc): Call free instead of internal_free.
        (move_alloc_c): Wrap long lines.
        * libgfortran.h (os_error): Export prototype.
        (internal_free): Remove prototype.
        * gfortran.map (GFORTRAN_1.0): Remove _gfortran_internal_free,
        _gfortran_internal_malloc and _gfortran_internal_malloc64.
        Add _gfortran_os_error.

Modified:
    trunk/gcc/fortran/ChangeLog
    trunk/gcc/fortran/f95-lang.c
    trunk/gcc/fortran/trans-array.c
    trunk/gcc/fortran/trans-decl.c
    trunk/gcc/fortran/trans-expr.c
    trunk/gcc/fortran/trans-intrinsic.c
    trunk/gcc/fortran/trans-stmt.c
    trunk/gcc/fortran/trans.c
    trunk/gcc/fortran/trans.h
    trunk/libgfortran/ChangeLog
    trunk/libgfortran/gfortran.map
    trunk/libgfortran/intrinsics/move_alloc.c
    trunk/libgfortran/libgfortran.h
    trunk/libgfortran/runtime/error.c
    trunk/libgfortran/runtime/memory.c


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30723


  parent reply	other threads:[~2007-05-14 19:34 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-06 23:05 [Bug fortran/30723] New: " fxcoudert at gcc dot gnu dot org
2007-02-06 23:06 ` [Bug fortran/30723] " fxcoudert at gcc dot gnu dot org
2007-02-07  9:58 ` rguenth at gcc dot gnu dot org
2007-02-07 19:22 ` fxcoudert at gcc dot gnu dot org
2007-03-04 20:12 ` fxcoudert at gcc dot gnu dot org
2007-03-04 21:02 ` rguenth at gcc dot gnu dot org
2007-05-14 19:34 ` fxcoudert at gcc dot gnu dot org [this message]
2007-05-14 19:35 ` fxcoudert at gcc dot gnu dot org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070514193411.1121.qmail@sourceware.org \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).