[PATCH, fortran] PR20441 -finit-local-zero
Asher Langton
langton2@llnl.gov
Fri Aug 31 23:57:00 GMT 2007
Hi all,
Here's an updated patch. I've added -finit-character=<n>, where 0 <=
n <= 127 is an ASCII value. Derived types aren't initialized, but
I've documented this in the manual. I've added a test that checks
initialization of SAVE'd variables. This has been bootstrapped (+make
pdf) and regression tested on x86_64-unknown-linux-gnu.
I won't have reliable internet access for the next couple of days, but
I'll be back online by Monday evening.
-Asher
2007-08-31 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,
-finit-character, 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-*).
(apply_default_init_local): Apply local initializer (-finit-*).
(resolve_fl_variable): Try to add local initializer (-finit-*).
* options.c (gfc_init_options, gfc_handle_option,
gfc_post_options): Handle -finit-local-zero, -finit-real,
-finit-integer, -finit-character, and -finit-logical flags.
2007-08-31 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.
* gfortran.dg/init_flag_6.f90: New.
* gfortran.dg/init_flag_7.f90: New.
On 8/17/07, Asher Langton <langton2@llnl.gov> wrote:
> :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, -finit-logical
> flags, and -finit-character 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: gfc070831_142756.diff
Type: application/octet-stream
Size: 13504 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20070831/5e7348c6/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/20070831/5e7348c6/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/20070831/5e7348c6/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/20070831/5e7348c6/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/20070831/5e7348c6/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/20070831/5e7348c6/attachment-0005.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: init_flag_6.f90
Type: application/octet-stream
Size: 494 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20070831/5e7348c6/attachment-0006.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: init_flag_7.f90
Type: application/octet-stream
Size: 1021 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20070831/5e7348c6/attachment-0007.obj>
More information about the Fortran
mailing list