[gfortran, committed] Fix segfault in PR16336
Paul Brook
paul@codesourcery.com
Sat Jul 10 22:01:00 GMT 2004
> 2004-07-10 Tobias Schlueter <tobias.schlueter@physik.uni-muenchen.de>
>
> PR fortran/16336
> * decl.c (gfc_match_save): Use-associated common block
> doesn't collide.
> * gfortran.h (gfc_common_head): Add new field 'name'.
> Fix typo in comment after #endif.
> * match.c (gfc_get_common): Add new argument from_common,
> mangle name if flag is set, fill in new field in structure
> gfc_common_head.
> (match_common): Set new arg in call to gfc_get_common,
> use-associated common block doesn't collide.
> * match.h (gfc_get_common): Adapt prototype.
> * module.c (load_commons): Set new arg in call to
> gfc_get_common.
> * symbol.c (free_common_tree): New function.
> (gfc_free_namespace): Call new function.
> * trans-common.c (several functions): Remove argument
> 'name', use name from gfc_common_head instead.
Ok, with minor nit below.
There are issues when you have multiple instances of the same common block.
However these aren't any worse than when the same common block is used in
multiple program units, so can be solved later.
Paul
> diff -u -p -r1.16 match.c
> --- match.c 10 Jul 2004 16:26:05 -0000 1.16
> +++ match.c 10 Jul 2004 20:51:39 -0000
> @@ -2049,22 +2049,38 @@ cleanup:
>
>
> /* Given a name, return a pointer to the common head structure,
> - creating it if it does not exist.
> + creating it if it does not exist. If FROM_MODULE is set, we mangle
> + the name so that it doesn't interfere with commons defined in the
> + using namespace.
s/is set/is nonzero/
More information about the Fortran
mailing list