This is the mail archive of the fortran@gcc.gnu.org mailing list for the GNU Fortran project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [Patch, Fortran, OOP] PR 46581: [4.6 Regression] segfault in SELECT TYPE with associate-name


Hi Dominique,

> First, the proc 'gfc_process_block_locals' has to be adjusted to have only one
> argument (the first one), otherwise one gets the error:
>
> ../../work/gcc/fortran/trans-decl.c: In function 'gfc_process_block_locals':
> ../../work/gcc/fortran/trans-decl.c:4826:68: error: unused parameter 'assoc' [-Werror=unused-parameter]
> cc1: all warnings being treated as errors

thanks for noticing. I missed this because I did not do a full bootstrap ...

Updated patch attached. Anyone feel like reviewing? ;)

Cheers,
Janus


2010-11-22  Janus Weil  <janus@gcc.gnu.org>

	* trans.h (gfc_process_block_locals): Removed second argument.
	* trans-decl.c (trans_associate_var): Moved to trans-stmt.c.
	(gfc_trans_deferred_vars): Skip ASSOCIATE variables.
	(gfc_process_block_locals): Don't mark associate names to be
	initialized.
	* trans-stmt.c (trans_associate_var): Moved here from trans-decl.c.
	(gfc_trans_block_construct): Call 'trans_associate_var' from here
	to make sure SELECT TYPE with associate-name is treated correctly.

2010-11-22  Janus Weil  <janus@gcc.gnu.org>

	* gfortran.dg/select_type_19.f03: New.

Attachment: pr46581_v2.diff
Description: Binary data


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]