re PR fortran/18937 (quadratic behaviour with many label "spaghetti" code)
authorTobias Schlüter <tobi@gcc.gnu.org>
Fri, 13 Apr 2007 13:48:08 +0000 (15:48 +0200)
committerTobias Schlüter <tobi@gcc.gnu.org>
Fri, 13 Apr 2007 13:48:08 +0000 (15:48 +0200)
commit0615f92345112bf405492e83c49273f4956e6df2
treebe0d426b6781435930dee66ab8761429aca3b837
parentd1138d8e5e398c3847ff55cab3a4c3c9cb538814
re PR fortran/18937 (quadratic behaviour with many label "spaghetti" code)

PR fortran/18937
fortran/
* resolve.c: Include obstack.h and bitmap.h.  New variable
labels_obstack.
(code_stack): Add tail and reachable_labels fields.
(reachable_labels): New function.
(resolve_branch): Rework to use new fields in code_stack.
(resolve_code): Call reachable_labels.
(resolve_codes): Allocate and free labels_obstack.
testsuite/
* gfortran.dg/goto_2.f90: New.
* gfortran.dg/goto_3.f90: New.
* gfortran.dg/pr17708.f90: Rename to ...
* gfortran.dg/goto_4.f90: ... this, add comment pointing to
PR.

From-SVN: r123789
gcc/fortran/ChangeLog
gcc/fortran/resolve.c
gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/goto_2.f90 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/goto_3.f90 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/goto_4.f90 [new file with mode: 0644]
gcc/testsuite/gfortran.dg/pr17708.f90 [deleted file]