This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/55591] strict-aliasing & Fortran
- From: "Joost.VandeVondele at mat dot ethz.ch" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 29 Mar 2013 06:13:38 +0000
- Subject: [Bug fortran/55591] strict-aliasing & Fortran
- Auto-submitted: auto-generated
- References: <bug-55591-4 at http dot gcc dot gnu dot org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55591
--- Comment #5 from Joost VandeVondele <Joost.VandeVondele at mat dot ethz.ch> 2013-03-29 06:13:38 UTC ---
(In reply to comment #3)
> Untested (but successfully compiled) patch:
>
> --- a/gcc/fortran/options.c
> +++ b/gcc/fortran/options.c
> @@ -170,4 +170,6 @@ gfc_init_options (unsigned int decoded_options_count,
> set_default_std_flags ();
>
> + flag_strict_aliasing = -1;
> +
> /* Initialize cpp-related options. */
> gfc_cpp_init_options (decoded_options_count, decoded_options);
> @@ -275,4 +277,8 @@ gfc_post_options (const char **pfilename)
> gfc_option.flag_whole_file = 1;
>
> + /* By default use strict-aliasing semantics. */
> + if (flag_strict_aliasing == -1)
> + flag_strict_aliasing = 1;
> +
> /* Fortran allows associative math - but we cannot reassociate if
> we want traps or signed zeros. Cf. also flag_protect_parens. */
what about applying this to stage 1 4.9 ?