Re: [patch, fortran] PR 54833 Don't wrap calls to free(a) in if (a != NULL)

2012-10-27 Thread Andreas Schwab
Thomas Koenig tkoe...@netcologne.de writes: PR fortran/54833 * trans.c (gfc_call_free): Do not wrap the call to __builtin_free in check for NULL. (gfc_deallocate_with_status): For automatic deallocation without status for non-coarrays, don't wrap call

Re: [patch, fortran] PR 54833 Don't wrap calls to free(a) in if (a != NULL)

2012-10-27 Thread Thomas Koenig
Hi Andreas, Thomas Koenig tkoe...@netcologne.de writes: PR fortran/54833 * trans.c (gfc_call_free): Do not wrap the call to __builtin_free in check for NULL. (gfc_deallocate_with_status): For automatic deallocation without status for non-coarrays,

Re: [patch, fortran] PR 54833 Don't wrap calls to free(a) in if (a != NULL)

2012-10-27 Thread Andreas Schwab
Thomas Koenig tkoe...@netcologne.de writes: Does not happen on the architectures that I used, and I do not have access to that architecture. A cross compiler is enough. Does a (rougly) equivalent C case compile? How does a (rougly) equivalent C case look like? Andreas. -- Andreas Schwab,

Re: [patch, fortran] PR 54833 Don't wrap calls to free(a) in if (a != NULL)

2012-10-27 Thread Steven Bosscher
On Sat, Oct 27, 2012 at 7:41 PM, Andreas Schwab sch...@linux-m68k.org wrote: How does a (rougly) equivalent C case look like? Usually something can be constructed from the -fdump-tree-gimple dump. Ciao! Steven

Re: [patch, fortran] PR 54833 Don't wrap calls to free(a) in if (a != NULL)

2012-10-27 Thread Andreas Schwab
Steven Bosscher stevenb@gmail.com writes: On Sat, Oct 27, 2012 at 7:41 PM, Andreas Schwab sch...@linux-m68k.org wrote: How does a (rougly) equivalent C case look like? Usually something can be constructed from the -fdump-tree-gimple dump. Doesn't look like. Andreas. -- Andreas Schwab,

[patch, fortran] PR 54833 Don't wrap calls to free(a) in if (a != NULL)

2012-10-06 Thread Thomas Koenig
Hello world, the attached patch removes wrapping calls to free(a) by if (a != NULL) for some cases. It is not complete, because automatic deallocation of allocatable structure components is not yet covered. OK for trunk? Thomas 2012-10-06 Thomas König tkoe...@gcc.gnu.org

Re: [patch, fortran] PR 54833 Don't wrap calls to free(a) in if (a != NULL)

2012-10-06 Thread Thomas Koenig
I wrote: the attached patch removes wrapping calls to free(a) by if (a != NULL) for some cases. It is not complete, because automatic deallocation of allocatable structure components is not yet covered. I accidentally posted an old version, which had a bug in coarrays (basically was just