diff options
author | François-Xavier Coudert <fxcoudert@gcc.gnu.org> | 2006-02-08 20:54:14 +0000 |
---|---|---|
committer | François-Xavier Coudert <fxcoudert@gcc.gnu.org> | 2006-02-08 20:54:14 +0000 |
commit | 5f8f531322798fed73c507580e602903b96ab122 (patch) | |
tree | ff93abb380a7a9b32186abc7f83123e78202327a /gcc | |
parent | 2cf94e58cbde0c5e906720768bd738588a1a075a (diff) | |
download | gcc-5f8f531322798fed73c507580e602903b96ab122.zip gcc-5f8f531322798fed73c507580e602903b96ab122.tar.gz gcc-5f8f531322798fed73c507580e602903b96ab122.tar.bz2 |
re PR libfortran/25425 ([4.1 only] F95 and F2003 differ on list-directed output for 0.0)
PR libfortran/25425
* trans-decl.c (gfc_generate_function_code): Add new argument,
pedantic, to set_std call.
* libgfortran.h: Add pedantic field to compile_options struct.
* io/write.c (calculate_G_format): Depending on the standard,
choose E or F format for list-directed output of 0.0.
* runtime/error.c (notify_std): Make warning and error dependent
on pedanticity.
* runtime/compile_options.c (set_std): Use new pedantic argument.
From-SVN: r110769
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/fortran/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/fortran/trans-decl.c | 14 |
2 files changed, 15 insertions, 5 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index 66f638f..83dd30c 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,9 @@ +2006-02-08 Francois-Xavier Coudert <coudert@clipper.ens.fr> + + PR libfortran/25425 + * trans-decl.c (gfc_generate_function_code): Add new argument, + pedantic, to set_std call. + 2005-02-06 Thomas Koenig <Thomas.Koenig@online.de> PR libfortran/23815 diff --git a/gcc/fortran/trans-decl.c b/gcc/fortran/trans-decl.c index 4811b7a..d1892b7 100644 --- a/gcc/fortran/trans-decl.c +++ b/gcc/fortran/trans-decl.c @@ -2226,7 +2226,8 @@ gfc_build_builtin_function_decls (void) gfor_fndecl_set_std = gfc_build_library_function_decl (get_identifier (PREFIX("set_std")), void_type_node, - 2, + 3, + gfc_int4_type_node, gfc_int4_type_node, gfc_int4_type_node); @@ -2817,10 +2818,10 @@ gfc_generate_function_code (gfc_namespace * ns) /* Now generate the code for the body of this function. */ gfc_init_block (&body); - /* If this is the main program and we compile with -pedantic, add a call - to set_std to set up the runtime library Fortran language standard - parameters. */ - if (sym->attr.is_main_program && pedantic) + /* If this is the main program, add a call to set_std to set up the + runtime library Fortran language standard parameters. */ + + if (sym->attr.is_main_program) { tree arglist, gfc_int4_type_node; @@ -2831,6 +2832,9 @@ gfc_generate_function_code (gfc_namespace * ns) arglist = gfc_chainon_list (arglist, build_int_cst (gfc_int4_type_node, gfc_option.allow_std)); + arglist = gfc_chainon_list (arglist, + build_int_cst (gfc_int4_type_node, + pedantic)); tmp = build_function_call_expr (gfor_fndecl_set_std, arglist); gfc_add_expr_to_block (&body, tmp); } |