PR fortran/78026
commitbd7b3fc82606f17a8512f36336b8f346283b1de4
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 27 Oct 2016 19:55:12 +0000 (27 19:55 +0000)
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 27 Oct 2016 19:55:12 +0000 (27 19:55 +0000)
tree8eace66a9ed3bade23fd586a126fba2b7fcd0e9f
parent1e312c9c2e8435a76f60a3837eb5cd8180ecda5c
PR fortran/78026
* parse.c (decode_statement): Don't create namespace for possible
select type here and destroy it afterwards.
(parse_select_type_block): Set gfc_current_ns to new_st.ext.block.ns.
(parse_executable, gfc_parse_file): Formatting fixes.
* match.c (gfc_match_select_type): Create namespace for select type
here, only after matching select type.  Formatting fixes.  Free that
namespace if not returning MATCH_YES, after gfc_undo_symbols,
otherwise remember it in new_st.ext.block.ns and switch to parent
namespace anyway.

* gfortran.dg/gomp/pr78026.f03: New test.
* gfortran.dg/select_type_38.f03: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@241630 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/fortran/ChangeLog
gcc/fortran/match.c
gcc/fortran/parse.c
gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/gomp/pr78026.f03 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/select_type_38.f03 [new file with mode: 0644]