[Bug fortran/37253] Segmentation fault with procedure pointer
janus at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Wed Aug 27 21:12:00 GMT 2008
------- Comment #3 from janus at gcc dot gnu dot org 2008-08-27 21:10 -------
> Actual, I have the feeling the attr.proc_pointer is not saved at all in
> module.c, cf. ab_attribute in that file.
Exactly. Thanks for pointing this out. The following patch fixes it:
Index: gcc/fortran/module.c
===================================================================
--- gcc/fortran/module.c (revision 139622)
+++ gcc/fortran/module.c (working copy)
@@ -1643,7 +1643,7 @@ mio_internal_string (char *string)
typedef enum
{ AB_ALLOCATABLE, AB_DIMENSION, AB_EXTERNAL, AB_INTRINSIC, AB_OPTIONAL,
- AB_POINTER, AB_TARGET, AB_DUMMY, AB_RESULT, AB_DATA,
+ AB_POINTER, AB_PROC_POINTER, AB_TARGET, AB_DUMMY, AB_RESULT, AB_DATA,
AB_IN_NAMELIST, AB_IN_COMMON, AB_FUNCTION, AB_SUBROUTINE, AB_SEQUENCE,
AB_ELEMENTAL, AB_PURE, AB_RECURSIVE, AB_GENERIC, AB_ALWAYS_EXPLICIT,
AB_CRAY_POINTER, AB_CRAY_POINTEE, AB_THREADPRIVATE, AB_ALLOC_COMP,
@@ -1661,6 +1661,7 @@ static const mstring attr_bits[] =
minit ("INTRINSIC", AB_INTRINSIC),
minit ("OPTIONAL", AB_OPTIONAL),
minit ("POINTER", AB_POINTER),
+ minit ("PROC_POINTER", AB_PROC_POINTER),
minit ("VOLATILE", AB_VOLATILE),
minit ("TARGET", AB_TARGET),
minit ("THREADPRIVATE", AB_THREADPRIVATE),
@@ -1743,6 +1744,8 @@ mio_symbol_attribute (symbol_attribute *
MIO_NAME (ab_attribute) (AB_OPTIONAL, attr_bits);
if (attr->pointer)
MIO_NAME (ab_attribute) (AB_POINTER, attr_bits);
+ if (attr->proc_pointer)
+ MIO_NAME (ab_attribute) (AB_PROC_POINTER, attr_bits);
if (attr->is_protected)
MIO_NAME (ab_attribute) (AB_PROTECTED, attr_bits);
if (attr->value)
@@ -1839,6 +1842,9 @@ mio_symbol_attribute (symbol_attribute *
case AB_POINTER:
attr->pointer = 1;
break;
+ case AB_PROC_POINTER:
+ attr->proc_pointer = 1;
+ break;
case AB_PROTECTED:
attr->is_protected = 1;
break;
--
janus at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |janus at gcc dot gnu dot org
|dot org |
Status|NEW |ASSIGNED
Last reconfirmed|2008-08-27 12:35:40 |2008-08-27 21:10:58
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37253
More information about the Gcc-bugs
mailing list