]> gcc.gnu.org Git - gcc.git/commit
backport: re PR fortran/90786 (ICE on procedure pointer assignment to function with...
authorThomas Koenig <tkoenig@gcc.gnu.org>
Tue, 30 Jul 2019 19:11:03 +0000 (19:11 +0000)
committerThomas Koenig <tkoenig@gcc.gnu.org>
Tue, 30 Jul 2019 19:11:03 +0000 (19:11 +0000)
commit402b831544c18769f3b12de512a0a8dc2a395171
treea2cfd2df0f8955ecfeecffa045473a07adcd25e9
parentea7e4625c4aed62d1555b3811632d54f295b0c23
backport: re PR fortran/90786 (ICE on procedure pointer assignment to function with class pointer result)

2019-07-29  Thomas Koenig  <tkoenig@gcc.gnu.org>
Paul Thomas <pault@gcc.gnu.org>

Backport from trunk
PR fortran/90786
PR fortran/90813
* trans-expr.c (pointer_assignment_is_proc_pointer) Remove as
it is very simple and only called from one place.
(gfc_trans_pointer_assignment): Rename non_proc_pointer_assign
as non_proc_ptr_assign. Assign to it directly, rather than call
to above, deleted function and use gfc_expr_attr instead of
only checking the reference chain.
* dump-parse-tree.c (show_global_symbol): New function.
(gfc_dump_global_symbols): New function.
* gfortran.h (gfc_traverse_gsymbol): Add prototype.
(gfc_dump_global_symbols): Likewise.
* invoke.texi: Document -fdump-fortran-global.
* lang.opt: Add -fdump-fortran-global.
* parse.c (gfc_parse_file): Handle flag_dump_fortran_global.
* symbol.c (gfc_traverse_gsymbol): New function.
* trans-decl.c (sym_identifier): New function.
(mangled_identifier): New function, doing most of the work
of gfc_sym_mangled_identifier.
(gfc_sym_mangled_identifier): Use mangled_identifier.  Add mangled
identifier to global symbol table.
(get_proc_pointer_decl): Use backend decl from global identifier
if present.

2019-07-29  Thomas Koenig  <tkoenig@gcc.gnu.org>
Paul Thomas <pault@gcc.gnu.org>

Backport from trunk
PR fortran/90786
PR fortran/90813
* gfortran.dg/proc_ptr_51.f90: New test.

Co-Authored-By: Paul Thomas <pault@gcc.gnu.org>
From-SVN: r273913
gcc/fortran/ChangeLog
gcc/fortran/dump-parse-tree.c
gcc/fortran/gfortran.h
gcc/fortran/invoke.texi
gcc/fortran/lang.opt
gcc/fortran/parse.c
gcc/fortran/symbol.c
gcc/fortran/trans-decl.c
gcc/fortran/trans-expr.c
gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/proc_ptr_51.f90 [new file with mode: 0644]
This page took 0.06199 seconds and 5 git commands to generate.