[Patch, Fortran, OOP] PR 46581: [4.6 Regression] segfault in SELECT TYPE with associate-name
Janus Weil
janus@gcc.gnu.org
Mon Nov 22 17:03:00 GMT 2010
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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pr46581_v2.diff
Type: application/octet-stream
Size: 8292 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20101122/29602378/attachment-0001.obj>
More information about the Fortran
mailing list