From c3fb821439acc0f9c210b02da67aad962b73b148 Mon Sep 17 00:00:00 2001 From: Tobias Burnus Date: Sun, 16 Sep 2012 14:11:04 +0200 Subject: [PATCH] trans-decl.c (gfc_generate_function_code): Fix gfc_option.coarray check. 2012-09-16 Tobias Burnus * trans-decl.c (gfc_generate_function_code): Fix gfc_option.coarray check. * trans-stmt.c (compute_inner_temp_size): Fix handling of gfc_option.rtcheck. From-SVN: r191358 --- gcc/fortran/ChangeLog | 7 +++++++ gcc/fortran/trans-decl.c | 2 +- gcc/fortran/trans-stmt.c | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index f363d59a750..24ff91f385b 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,10 @@ +2012-09-16 Tobias Burnus + + * trans-decl.c (gfc_generate_function_code): Fix + gfc_option.coarray check. + * trans-stmt.c (compute_inner_temp_size): Fix handling + of gfc_option.rtcheck. + 2012-09-16 Mikael Morin * symbol.c (gfc_undo_symbols): Correctly undo namelists. diff --git a/gcc/fortran/trans-decl.c b/gcc/fortran/trans-decl.c index 7e59cb6dcb4..53c248d963b 100644 --- a/gcc/fortran/trans-decl.c +++ b/gcc/fortran/trans-decl.c @@ -5480,7 +5480,7 @@ gfc_generate_function_code (gfc_namespace * ns) } current_function_decl = old_context; - if (decl_function_context (fndecl) && !gfc_option.coarray == GFC_FCOARRAY_LIB + if (decl_function_context (fndecl) && gfc_option.coarray != GFC_FCOARRAY_LIB && has_coarray_vars) /* Register this function with cgraph just far enough to get it added to our parent's nested function list. diff --git a/gcc/fortran/trans-stmt.c b/gcc/fortran/trans-stmt.c index 8bc491655be..204f069cc53 100644 --- a/gcc/fortran/trans-stmt.c +++ b/gcc/fortran/trans-stmt.c @@ -3132,7 +3132,7 @@ compute_inner_temp_size (gfc_expr *expr1, gfc_expr *expr2, /* Calculate the bounds of the scalarization. */ save_flag = gfc_option.rtcheck; - gfc_option.rtcheck &= !GFC_RTCHECK_BOUNDS; + gfc_option.rtcheck &= ~GFC_RTCHECK_BOUNDS; gfc_conv_ss_startstride (&loop); gfc_option.rtcheck = save_flag; gfc_conv_loop_setup (&loop, &expr2->where);