This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC 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]

[Bug fortran/55591] strict-aliasing & Fortran


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 ?


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