http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55591
Tobias Burnus <burnus at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |burnus at gcc dot gnu.org --- Comment #3 from Tobias Burnus <burnus at gcc dot gnu.org> 2012-12-04 17:05:45 UTC --- 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. */