From: Tobias Schlüter Date: Sun, 16 Jan 2005 16:45:57 +0000 (+0100) Subject: trans-intrinsic.c (gfc_conv_intrinsic_index, [...]): Remove 'gfc'-prefix from local... X-Git-Tag: releases/gcc-4.0.0~1532 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=0da87370fb10795b17f53aad3391f39f75c81817;p=thirdparty%2Fgcc.git trans-intrinsic.c (gfc_conv_intrinsic_index, [...]): Remove 'gfc'-prefix from local variable... * trans-intrinsic.c (gfc_conv_intrinsic_index, gfc_conv_intrinsic_scan, gfc_conv_intrinsic_verify): Remove 'gfc'-prefix from local variable, remove dead code, use correct type when inserting argument. From-SVN: r93731 --- diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index 1b5858c65566..c11f54a78fa2 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -19,7 +19,12 @@ gfc_conv_intrinsic_trim, gfc_conv_intrinsic_iargc): Use 'build_int_cst' instead of converting 'integer_zero_node' or 'integer_one_node' respectively. - + + * trans-intrinsic.c (gfc_conv_intrinsic_index, + gfc_conv_intrinsic_scan, gfc_conv_intrinsic_verify): Remove + 'gfc'-prefix from local variable, remove dead code, use correct + type when inserting argument. + 2005-01-16 Steven G. Kargl PR 19168 diff --git a/gcc/fortran/trans-intrinsic.c b/gcc/fortran/trans-intrinsic.c index c44499fcdeb3..b49479dbbbee 100644 --- a/gcc/fortran/trans-intrinsic.c +++ b/gcc/fortran/trans-intrinsic.c @@ -1959,7 +1959,7 @@ gfc_conv_intrinsic_len_trim (gfc_se * se, gfc_expr * expr) static void gfc_conv_intrinsic_index (gfc_se * se, gfc_expr * expr) { - tree gfc_logical4_type_node = gfc_get_logical_type (4); + tree logical4_type_node = gfc_get_logical_type (4); tree args; tree back; tree type; @@ -1970,14 +1970,14 @@ gfc_conv_intrinsic_index (gfc_se * se, gfc_expr * expr) tmp = gfc_advance_chain (args, 3); if (TREE_CHAIN (tmp) == NULL_TREE) { - back = convert (gfc_logical4_type_node, integer_one_node); - back = tree_cons (NULL_TREE, integer_zero_node, NULL_TREE); + back = tree_cons (NULL_TREE, build_int_cst (logical4_type_node, 0), + NULL_TREE); TREE_CHAIN (tmp) = back; } else { back = TREE_CHAIN (tmp); - TREE_VALUE (back) = convert (gfc_logical4_type_node, TREE_VALUE (back)); + TREE_VALUE (back) = convert (logical4_type_node, TREE_VALUE (back)); } se->expr = gfc_build_function_call (gfor_fndecl_string_index, args); @@ -2276,7 +2276,7 @@ gfc_conv_associated (gfc_se *se, gfc_expr *expr) static void gfc_conv_intrinsic_scan (gfc_se * se, gfc_expr * expr) { - tree gfc_logical4_type_node = gfc_get_logical_type (4); + tree logical4_type_node = gfc_get_logical_type (4); tree args; tree back; tree type; @@ -2287,14 +2287,14 @@ gfc_conv_intrinsic_scan (gfc_se * se, gfc_expr * expr) tmp = gfc_advance_chain (args, 3); if (TREE_CHAIN (tmp) == NULL_TREE) { - back = convert (gfc_logical4_type_node, integer_one_node); - back = tree_cons (NULL_TREE, integer_zero_node, NULL_TREE); + back = tree_cons (NULL_TREE, build_int_cst (logical4_type_node, 0), + NULL_TREE); TREE_CHAIN (tmp) = back; } else { back = TREE_CHAIN (tmp); - TREE_VALUE (back) = convert (gfc_logical4_type_node, TREE_VALUE (back)); + TREE_VALUE (back) = convert (logical4_type_node, TREE_VALUE (back)); } se->expr = gfc_build_function_call (gfor_fndecl_string_scan, args); @@ -2309,7 +2309,7 @@ gfc_conv_intrinsic_scan (gfc_se * se, gfc_expr * expr) static void gfc_conv_intrinsic_verify (gfc_se * se, gfc_expr * expr) { - tree gfc_logical4_type_node = gfc_get_logical_type (4); + tree logical4_type_node = gfc_get_logical_type (4); tree args; tree back; tree type; @@ -2320,14 +2320,14 @@ gfc_conv_intrinsic_verify (gfc_se * se, gfc_expr * expr) tmp = gfc_advance_chain (args, 3); if (TREE_CHAIN (tmp) == NULL_TREE) { - back = convert (gfc_logical4_type_node, integer_one_node); - back = tree_cons (NULL_TREE, integer_zero_node, NULL_TREE); + back = tree_cons (NULL_TREE, build_int_cst (logical4_type_node, 0), + NULL_TREE); TREE_CHAIN (tmp) = back; } else { back = TREE_CHAIN (tmp); - TREE_VALUE (back) = convert (gfc_logical4_type_node, TREE_VALUE (back)); + TREE_VALUE (back) = convert (logical4_type_node, TREE_VALUE (back)); } se->expr = gfc_build_function_call (gfor_fndecl_string_verify, args);