[PATCH, fortran] PR20441 -finit-local-zero

Asher Langton langton2@llnl.gov
Fri Aug 17 22:35:00 GMT 2007


:ADDPATCH fortran:


Hi all,

Here's a patch to add -finit-local-zero, as well as some finer-grained
options.  I have a working version of the runtime-controlled
initialization as discussed previously, but it still needs to be
cleaned up a bit, so I'll submit it as a separate patch:

http://gcc.gnu.org/ml/fortran/2007-06/msg00028.html

I've bootstrapped and regression tested this on x86_64-linux.
Everything passes in the ordinary regression tests, and with
RUNTESTFLAGS="--tool_opts -finit-local-zero" added, the only failures
are tests that invoke cc1 ("cc1: warning: command line option
"-finit-local-zero" is valid for Fortran but not for C").

-Asher


2007-08-17  Asher Langton  <langton2@llnl.gov>

	PR fortran/20441
        * gfortran.h : Add init_local_* enums and init_flag_* flags to
	gfc_option_t.
	* lang.opt: Add -finit-local-zero, -finit-real, -finit-integer,
	and -finit-logical flags.
	* invoke.texi: Document new options.
	* resolve.c (build_init_assign): New function.
	(apply_init_assign): Move part of function into build_init_assign.
	(build_default_init_expr): Build local initializer (-finit-*).
	(apple_default_init_local): Apply local initializer (-finit-*).
	(resolve_fl_variable): Try to add local initializer (-finit-*).
	* options.c (gfc_init_options, gfc_handle_option): Handle
	-finit-local-zero, -finit-real, -finit-integer, and -finit-logical
	flags.

2007-08-17  Asher Langton  <langton2@llnl.gov>

	PR fortran/20441
	* gfortran.dg/init_flag_1.f90: New.
	* gfortran.dg/init_flag_2.f90: New.
	* gfortran.dg/init_flag_3.f90: New.
	* gfortran.dg/init_flag_4.f90: New.
	* gfortran.dg/init_flag_5.f90: New.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gfc070817_123829.diff
Type: application/octet-stream
Size: 12347 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20070817/2e9b70a2/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: init_flag_1.f90
Type: application/octet-stream
Size: 1321 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20070817/2e9b70a2/attachment-0001.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: init_flag_2.f90
Type: application/octet-stream
Size: 1035 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20070817/2e9b70a2/attachment-0002.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: init_flag_3.f90
Type: application/octet-stream
Size: 1049 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20070817/2e9b70a2/attachment-0003.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: init_flag_4.f90
Type: application/octet-stream
Size: 505 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20070817/2e9b70a2/attachment-0004.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: init_flag_5.f90
Type: application/octet-stream
Size: 506 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20070817/2e9b70a2/attachment-0005.obj>


More information about the Fortran mailing list