aboutsummaryrefslogtreecommitdiff
path: root/gcc/fortran
diff options
context:
space:
mode:
authorJanus Weil <janus@gcc.gnu.org>2008-08-28 17:10:50 +0200
committerJanus Weil <janus@gcc.gnu.org>2008-08-28 17:10:50 +0200
commitb7fdeec95fa7638342b3d3319f9ac177e830ceed (patch)
treef23e579a55ddc8a3611242cab47bcd889b8cc17c /gcc/fortran
parent5bdc1946f07880739cdbca20105cebcba5795de0 (diff)
downloadgcc-b7fdeec95fa7638342b3d3319f9ac177e830ceed.zip
gcc-b7fdeec95fa7638342b3d3319f9ac177e830ceed.tar.gz
gcc-b7fdeec95fa7638342b3d3319f9ac177e830ceed.tar.bz2
re PR fortran/37253 (Segmentation fault with procedure pointer)
2008-08-28 Janus Weil <janus@gcc.gnu.org> PR fortran/37253 * module.c (ab_attribute,attr_bits,mio_symbol_attribute): Take care of saving attr.procedure and attr.proc_ptr to the module file. 2008-08-28 Janus Weil <janus@gcc.gnu.org> PR fortran/37253 * gfortran.dg/proc_ptr_10.f90: New. From-SVN: r139713
Diffstat (limited to 'gcc/fortran')
-rw-r--r--gcc/fortran/ChangeLog6
-rw-r--r--gcc/fortran/module.c14
2 files changed, 19 insertions, 1 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog
index b606361..c626a65 100644
--- a/gcc/fortran/ChangeLog
+++ b/gcc/fortran/ChangeLog
@@ -1,3 +1,9 @@
+2008-08-28 Janus Weil <janus@gcc.gnu.org>
+
+ PR fortran/37253
+ * module.c (ab_attribute,attr_bits,mio_symbol_attribute): Take care of
+ saving attr.procedure and attr.proc_ptr to the module file.
+
2008-08-25 Daniel Kraft <d@domob.eu>
* gfortran.h (gfc_find_component): Add new arguments.
diff --git a/gcc/fortran/module.c b/gcc/fortran/module.c
index d5cf382..26dc58b 100644
--- a/gcc/fortran/module.c
+++ b/gcc/fortran/module.c
@@ -1649,7 +1649,7 @@ typedef enum
AB_CRAY_POINTER, AB_CRAY_POINTEE, AB_THREADPRIVATE, AB_ALLOC_COMP,
AB_POINTER_COMP, AB_PRIVATE_COMP, AB_VALUE, AB_VOLATILE, AB_PROTECTED,
AB_IS_BIND_C, AB_IS_C_INTEROP, AB_IS_ISO_C, AB_ABSTRACT, AB_ZERO_COMP,
- AB_EXTENSION
+ AB_EXTENSION, AB_PROCEDURE, AB_PROC_POINTER
}
ab_attribute;
@@ -1690,6 +1690,8 @@ static const mstring attr_bits[] =
minit ("PROTECTED", AB_PROTECTED),
minit ("ABSTRACT", AB_ABSTRACT),
minit ("EXTENSION", AB_EXTENSION),
+ minit ("PROCEDURE", AB_PROCEDURE),
+ minit ("PROC_POINTER", AB_PROC_POINTER),
minit (NULL, -1)
};
@@ -1805,6 +1807,10 @@ mio_symbol_attribute (symbol_attribute *attr)
MIO_NAME (ab_attribute) (AB_ZERO_COMP, attr_bits);
if (attr->extension)
MIO_NAME (ab_attribute) (AB_EXTENSION, attr_bits);
+ if (attr->procedure)
+ MIO_NAME (ab_attribute) (AB_PROCEDURE, attr_bits);
+ if (attr->proc_pointer)
+ MIO_NAME (ab_attribute) (AB_PROC_POINTER, attr_bits);
mio_rparen ();
@@ -1926,6 +1932,12 @@ mio_symbol_attribute (symbol_attribute *attr)
case AB_EXTENSION:
attr->extension = 1;
break;
+ case AB_PROCEDURE:
+ attr->procedure = 1;
+ break;
+ case AB_PROC_POINTER:
+ attr->proc_pointer = 1;
+ break;
}
}
}