diff options
author | Janne Blomqvist <jb@gcc.gnu.org> | 2018-02-23 11:07:24 +0200 |
---|---|---|
committer | Janne Blomqvist <jb@gcc.gnu.org> | 2018-02-23 11:07:24 +0200 |
commit | dffb1e2279fc9df82b2817c87a9a6319e7508532 (patch) | |
tree | 858fec6d98338d83564c6149d999223d2f44d204 /gcc/fortran/trans-stmt.c | |
parent | 355436fb15420a1b05d3e333f202fa3296b4baaf (diff) | |
download | gcc-dffb1e2279fc9df82b2817c87a9a6319e7508532.zip gcc-dffb1e2279fc9df82b2817c87a9a6319e7508532.tar.gz gcc-dffb1e2279fc9df82b2817c87a9a6319e7508532.tar.bz2 |
PR 84519 Handle optional QUIET specifier for STOP and ERROR STOP
Fortran 2018 adds a new QUIET specifier for the STOP and ERROR STOP
statements, in order to suppress the printing of signaling FP
exceptions and the stop code. This patch adds the necessary library
changes, but for now the new specifier is not parsed and the frontend
unconditionally adds a false value for the new argument.
Regtested on x86_64-pc-linux-gnu.
gcc/fortran/ChangeLog:
2018-02-23 Janne Blomqvist <jb@gcc.gnu.org>
PR fortran/84519
* trans-decl.c (gfc_build_builtin_function_decls): Add bool
argument to stop and error stop decls.
* trans-stmt.c (gfc_trans_stop): Add false value to argument
lists.
libgfortran/ChangeLog:
2018-02-23 Janne Blomqvist <jb@gcc.gnu.org>
PR fortran/84519
* caf/libcaf.h (_gfortran_caf_stop_numeric): Add bool argument.
(_gfortran_caf_stop_str): Likewise.
(_gfortran_caf_error_stop_str): Likewise.
(_gfortran_caf_error_stop): Likewise.
* caf/mpi.c (_gfortran_caf_error_stop_str): Handle new argument.
(_gfortran_caf_error_stop): Likewise.
* caf/single.c (_gfortran_caf_stop_numeric): Likewise.
(_gfortran_caf_stop_str): Likewise.
(_gfortran_caf_error_stop_str): Likewise.
(_gfortran_caf_error_stop): Likewise.
(_gfortran_caf_lock): Likewise.
(_gfortran_caf_unlock): Likewise.
* libgfortran.h (stop_string): Add bool argument.
* runtime/pause.c (do_pause): Add false argument.
* runtime/stop.c (stop_numeric): Handle new argument.
(stop_string): Likewise.
(error_stop_string): Likewise.
(error_stop_numeric): Likewise.
From-SVN: r257928
Diffstat (limited to 'gcc/fortran/trans-stmt.c')
-rw-r--r-- | gcc/fortran/trans-stmt.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/gcc/fortran/trans-stmt.c b/gcc/fortran/trans-stmt.c index f1fe8a0..cf76fd0 100644 --- a/gcc/fortran/trans-stmt.c +++ b/gcc/fortran/trans-stmt.c @@ -642,7 +642,8 @@ gfc_trans_stop (gfc_code *code, bool error_stop) : (flag_coarray == GFC_FCOARRAY_LIB ? gfor_fndecl_caf_stop_str : gfor_fndecl_stop_string), - 2, build_int_cst (pchar_type_node, 0), tmp); + 3, build_int_cst (pchar_type_node, 0), tmp, + boolean_false_node); } else if (code->expr1->ts.type == BT_INTEGER) { @@ -654,8 +655,9 @@ gfc_trans_stop (gfc_code *code, bool error_stop) : gfor_fndecl_error_stop_numeric) : (flag_coarray == GFC_FCOARRAY_LIB ? gfor_fndecl_caf_stop_numeric - : gfor_fndecl_stop_numeric), 1, - fold_convert (integer_type_node, se.expr)); + : gfor_fndecl_stop_numeric), 2, + fold_convert (integer_type_node, se.expr), + boolean_false_node); } else { @@ -668,8 +670,9 @@ gfc_trans_stop (gfc_code *code, bool error_stop) : (flag_coarray == GFC_FCOARRAY_LIB ? gfor_fndecl_caf_stop_str : gfor_fndecl_stop_string), - 2, se.expr, fold_convert (size_type_node, - se.string_length)); + 3, se.expr, fold_convert (size_type_node, + se.string_length), + boolean_false_node); } gfc_add_expr_to_block (&se.pre, tmp); |