[Patch, Fortran] PR 41781: [OOP] bogus undefined label error with SELECT TYPE

Janus Weil janus@gcc.gnu.org
Wed Oct 21 18:29:00 GMT 2009


Hi all,

here is my patch for this PR, which is about problems with GOTOs
jumping in and out of BLOCK constructs (and SELECT TYPE). BLOCK
constructs have their own local namespace, and the problem was
basically that the label was stored in the wrong namespace.

Regtested on x86_64-unknown-linux-gnu. Ok for trunk?

Cheers,
Janus


2009-10-21  Janus Weil  <janus@gcc.gnu.org>

	PR fortran/41781
	* resolve.c (resolve_codes): Don't clear 'cs_base' for BLOCK constructs,
	to make sure labels are treated correctly.
	* symbol.c (gfc_get_st_label): Create labels in the right namespace.
	For BLOCK constructs go into the parent namespace.


2009-10-21  Janus Weil  <janus@gcc.gnu.org>

	PR fortran/41781
	* gfortran.dg/goto_8.f90: New test case.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pr41781.diff
Type: text/x-diff
Size: 1530 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20091021/b1679a86/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: goto_8.f90
Type: application/octet-stream
Size: 638 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20091021/b1679a86/attachment.obj>


More information about the Gcc-patches mailing list