diff options
author | jvdelisle <jvdelisle@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-10-21 00:45:15 +0000 |
---|---|---|
committer | jvdelisle <jvdelisle@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-10-21 00:45:15 +0000 |
commit | dff2ea5fc98a56aea5ca4f6d2c6a1bc35b32dffb (patch) | |
tree | f6c2d85ba773d860c79e23d0f535c1678b5d464b /gcc/fortran | |
parent | 7f3fd463e12064b69d3d340c2154d70d623ea673 (diff) | |
download | ppe42-gcc-dff2ea5fc98a56aea5ca4f6d2c6a1bc35b32dffb.tar.gz ppe42-gcc-dff2ea5fc98a56aea5ca4f6d2c6a1bc35b32dffb.zip |
2010-10-20 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR libgfortran/46079
* runtime/stop.c (stop_numeric_f08): New function.
(stop_numeric): Restore to previous behavior.
* gfortran.map: Add symbol _gfortran_stop_numeric_f08.
2010-10-20 Jerry DeLisle <jvdelisle@gcc.gnu.org>
PR fortran/46079
* trans_stmt.c (gfc_trans_stop): Fix whitespace. Build a call to new
F08 numeric stop function.
* trans.h: Add declaration for gfor_fndecl_stop_numeric_f08.
* trans-decl.c (gfc_build_builtin_function_decls): Build declaration
for stop_numeric_f08.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@165746 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/fortran')
-rw-r--r-- | gcc/fortran/ChangeLog | 9 | ||||
-rw-r--r-- | gcc/fortran/trans-decl.c | 7 | ||||
-rw-r--r-- | gcc/fortran/trans-stmt.c | 12 | ||||
-rw-r--r-- | gcc/fortran/trans.h | 1 |
4 files changed, 23 insertions, 6 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index 43360d89108..1e10747c6f5 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,12 @@ +2010-10-20 Jerry DeLisle <jvdelisle@gcc.gnu.org> + + PR fortran/46079 + * trans_stmt.c (gfc_trans_stop): Fix whitespace. Build a call to new + F08 numeric stop function. + * trans.h: Add declaration for gfor_fndecl_stop_numeric_f08. + * trans-decl.c (gfc_build_builtin_function_decls): Build declaration + for stop_numeric_f08. + 2010-10-18 Jerry DeLisle <jvdelisle@gcc.gnu.org> * gfortran.h: Remove definition of bt enumerator. diff --git a/gcc/fortran/trans-decl.c b/gcc/fortran/trans-decl.c index 23567924706..f2905cd327a 100644 --- a/gcc/fortran/trans-decl.c +++ b/gcc/fortran/trans-decl.c @@ -87,6 +87,7 @@ tree gfc_static_ctors; tree gfor_fndecl_pause_numeric; tree gfor_fndecl_pause_string; tree gfor_fndecl_stop_numeric; +tree gfor_fndecl_stop_numeric_f08; tree gfor_fndecl_stop_string; tree gfor_fndecl_error_stop_numeric; tree gfor_fndecl_error_stop_string; @@ -2802,6 +2803,12 @@ gfc_build_builtin_function_decls (void) /* STOP doesn't return. */ TREE_THIS_VOLATILE (gfor_fndecl_stop_numeric) = 1; + gfor_fndecl_stop_numeric_f08 = gfc_build_library_function_decl ( + get_identifier (PREFIX("stop_numeric_f08")), + void_type_node, 1, gfc_int4_type_node); + /* STOP doesn't return. */ + TREE_THIS_VOLATILE (gfor_fndecl_stop_numeric_f08) = 1; + gfor_fndecl_stop_string = gfc_build_library_function_decl_with_spec ( get_identifier (PREFIX("stop_string")), ".R.", void_type_node, 2, pchar_type_node, gfc_int4_type_node); diff --git a/gcc/fortran/trans-stmt.c b/gcc/fortran/trans-stmt.c index 31b0732844b..6e1a20b8c91 100644 --- a/gcc/fortran/trans-stmt.c +++ b/gcc/fortran/trans-stmt.c @@ -602,25 +602,25 @@ gfc_trans_stop (gfc_code *code, bool error_stop) { tmp = build_int_cst (gfc_int4_type_node, 0); tmp = build_call_expr_loc (input_location, - error_stop ? gfor_fndecl_error_stop_string + error_stop ? gfor_fndecl_error_stop_string : gfor_fndecl_stop_string, - 2, build_int_cst (pchar_type_node, 0), tmp); + 2, build_int_cst (pchar_type_node, 0), tmp); } else if (code->expr1->ts.type == BT_INTEGER) { gfc_conv_expr (&se, code->expr1); tmp = build_call_expr_loc (input_location, - error_stop ? gfor_fndecl_error_stop_numeric - : gfor_fndecl_stop_numeric, 1, + error_stop ? gfor_fndecl_error_stop_numeric + : gfor_fndecl_stop_numeric_f08, 1, fold_convert (gfc_int4_type_node, se.expr)); } else { gfc_conv_expr_reference (&se, code->expr1); tmp = build_call_expr_loc (input_location, - error_stop ? gfor_fndecl_error_stop_string + error_stop ? gfor_fndecl_error_stop_string : gfor_fndecl_stop_string, - 2, se.expr, se.string_length); + 2, se.expr, se.string_length); } gfc_add_expr_to_block (&se.pre, tmp); diff --git a/gcc/fortran/trans.h b/gcc/fortran/trans.h index d4c54c0e37b..efd5eb9e525 100644 --- a/gcc/fortran/trans.h +++ b/gcc/fortran/trans.h @@ -589,6 +589,7 @@ void gfc_omp_firstprivatize_type_sizes (struct gimplify_omp_ctx *, tree); extern GTY(()) tree gfor_fndecl_pause_numeric; extern GTY(()) tree gfor_fndecl_pause_string; extern GTY(()) tree gfor_fndecl_stop_numeric; +extern GTY(()) tree gfor_fndecl_stop_numeric_f08; extern GTY(()) tree gfor_fndecl_stop_string; extern GTY(()) tree gfor_fndecl_error_stop_numeric; extern GTY(()) tree gfor_fndecl_error_stop_string; |