]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
2007-07-28 Janne Blomqvist <jb@gcc.gnu.org>
authorjb <jb@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 27 Jul 2007 22:32:20 +0000 (22:32 +0000)
committerjb <jb@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 27 Jul 2007 22:32:20 +0000 (22:32 +0000)
PR fortran/32909
* trans-stmt.c (gfc_trans_character_select): Replace occurrences
of gfc_c_int_type_node with integer_type_node.
* trans-decl.c (gfc_build_intrinsic_function_decls): Likewise.
(gfc_build_builtin_function_decls): Likewise.
(gfc_generate_function_code): Likewise.
* trans-io.c (gfc_build_io_library_fndecls): Likewise.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@127003 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/fortran/ChangeLog
gcc/fortran/trans-decl.c
gcc/fortran/trans-io.c
gcc/fortran/trans-stmt.c

index 53c199feb4379cb2a46258c27c98aa78160b5f4a..29c134d8c06d5125327ea3cf9a5899fe3c7b742e 100644 (file)
@@ -1,3 +1,13 @@
+2007-07-28  Janne Blomqvist  <jb@gcc.gnu.org>
+
+       PR fortran/32909
+       * trans-stmt.c (gfc_trans_character_select): Replace occurrences
+       of gfc_c_int_type_node with integer_type_node.
+       * trans-decl.c (gfc_build_intrinsic_function_decls): Likewise.
+       (gfc_build_builtin_function_decls): Likewise.
+       (gfc_generate_function_code): Likewise.
+       * trans-io.c (gfc_build_io_library_fndecls): Likewise.
+
 2007-07-27  Janne Blomqvist  <jb@gcc.gnu.org>
 
        * trans-decl.c (gfc_build_builtin_function_decls): Use existing
index 0a9c0d7b3171acaca387ffa66ce89372f5764956..2e144735cf1ac7ba054bb81776e284141776f865 100644 (file)
@@ -1995,7 +1995,6 @@ gfc_build_intrinsic_function_decls (void)
   tree gfc_complex8_type_node = gfc_get_complex_type (8);
   tree gfc_complex10_type_node = gfc_get_complex_type (10);
   tree gfc_complex16_type_node = gfc_get_complex_type (16);
-  tree gfc_c_int_type_node = gfc_get_int_type (gfc_c_int_kind);
 
   /* String functions.  */
   gfor_fndecl_compare_string =
@@ -2055,7 +2054,7 @@ gfc_build_intrinsic_function_decls (void)
                                      3,
                                      pchar_type_node,
                                      gfc_charlen_type_node,
-                                     gfc_c_int_type_node);
+                                     integer_type_node);
 
   gfor_fndecl_fdate =
     gfc_build_library_function_decl (get_identifier (PREFIX("fdate")),
@@ -2215,7 +2214,7 @@ gfc_build_intrinsic_function_decls (void)
 
   /* BLAS functions.  */
   {
-    tree pint = build_pointer_type (gfc_c_int_type_node);
+    tree pint = build_pointer_type (integer_type_node);
     tree ps = build_pointer_type (gfc_get_real_type (gfc_default_real_kind));
     tree pd = build_pointer_type (gfc_get_real_type (gfc_default_double_kind));
     tree pc = build_pointer_type (gfc_get_complex_type (gfc_default_real_kind));
@@ -2228,32 +2227,32 @@ gfc_build_intrinsic_function_decls (void)
                                                           : "sgemm"),
                           void_type_node, 15, pchar_type_node,
                           pchar_type_node, pint, pint, pint, ps, ps, pint,
-                          ps, pint, ps, ps, pint, gfc_c_int_type_node,
-                          gfc_c_int_type_node);
+                          ps, pint, ps, ps, pint, integer_type_node,
+                          integer_type_node);
     gfor_fndecl_dgemm = gfc_build_library_function_decl
                          (get_identifier
                             (gfc_option.flag_underscoring ? "dgemm_"
                                                           : "dgemm"),
                           void_type_node, 15, pchar_type_node,
                           pchar_type_node, pint, pint, pint, pd, pd, pint,
-                          pd, pint, pd, pd, pint, gfc_c_int_type_node,
-                          gfc_c_int_type_node);
+                          pd, pint, pd, pd, pint, integer_type_node,
+                          integer_type_node);
     gfor_fndecl_cgemm = gfc_build_library_function_decl
                          (get_identifier
                             (gfc_option.flag_underscoring ? "cgemm_"
                                                           : "cgemm"),
                           void_type_node, 15, pchar_type_node,
                           pchar_type_node, pint, pint, pint, pc, pc, pint,
-                          pc, pint, pc, pc, pint, gfc_c_int_type_node,
-                          gfc_c_int_type_node);
+                          pc, pint, pc, pc, pint, integer_type_node,
+                          integer_type_node);
     gfor_fndecl_zgemm = gfc_build_library_function_decl
                          (get_identifier
                             (gfc_option.flag_underscoring ? "zgemm_"
                                                           : "zgemm"),
                           void_type_node, 15, pchar_type_node,
                           pchar_type_node, pint, pint, pint, pz, pz, pint,
-                          pz, pint, pz, pz, pint, gfc_c_int_type_node,
-                          gfc_c_int_type_node);
+                          pz, pint, pz, pz, pint, integer_type_node,
+                          integer_type_node);
   }
 
   /* Other functions.  */
@@ -2279,7 +2278,6 @@ gfc_build_intrinsic_function_decls (void)
 void
 gfc_build_builtin_function_decls (void)
 {
-  tree gfc_c_int_type_node = gfc_get_int_type (gfc_c_int_kind);
   tree gfc_int4_type_node = gfc_get_int_type (4);
   tree gfc_logical4_type_node = gfc_get_logical_type (4);
   tree gfc_pint4_type_node = build_pointer_type (gfc_int4_type_node);
@@ -2332,7 +2330,7 @@ gfc_build_builtin_function_decls (void)
 
   gfor_fndecl_select_string =
     gfc_build_library_function_decl (get_identifier (PREFIX("select_string")),
-                                     gfc_c_int_type_node, 0);
+                                     integer_type_node, 0);
 
   gfor_fndecl_runtime_error =
     gfc_build_library_function_decl (get_identifier (PREFIX("runtime_error")),
@@ -2350,7 +2348,7 @@ gfc_build_builtin_function_decls (void)
   gfor_fndecl_generate_error =
     gfc_build_library_function_decl (get_identifier (PREFIX("generate_error")),
                                     void_type_node, 3, pvoid_type_node,
-                                     gfc_c_int_type_node, pchar_type_node);
+                                     integer_type_node, pchar_type_node);
 
   gfor_fndecl_os_error =
     gfc_build_library_function_decl (get_identifier (PREFIX("os_error")),
@@ -2360,25 +2358,25 @@ gfc_build_builtin_function_decls (void)
 
   gfor_fndecl_set_fpe =
     gfc_build_library_function_decl (get_identifier (PREFIX("set_fpe")),
-                                   void_type_node, 1, gfc_c_int_type_node);
+                                   void_type_node, 1, integer_type_node);
 
   /* Keep the array dimension in sync with the call, later in this file.  */
   gfor_fndecl_set_options =
     gfc_build_library_function_decl (get_identifier (PREFIX("set_options")),
-                                   void_type_node, 2, gfc_c_int_type_node,
+                                   void_type_node, 2, integer_type_node,
                                    pvoid_type_node);
 
   gfor_fndecl_set_convert =
     gfc_build_library_function_decl (get_identifier (PREFIX("set_convert")),
-                                    void_type_node, 1, gfc_c_int_type_node);
+                                    void_type_node, 1, integer_type_node);
 
   gfor_fndecl_set_record_marker =
     gfc_build_library_function_decl (get_identifier (PREFIX("set_record_marker")),
-                                    void_type_node, 1, gfc_c_int_type_node);
+                                    void_type_node, 1, integer_type_node);
 
   gfor_fndecl_set_max_subrecord_length =
     gfc_build_library_function_decl (get_identifier (PREFIX("set_max_subrecord_length")),
-                                    void_type_node, 1, gfc_c_int_type_node);
+                                    void_type_node, 1, integer_type_node);
 
   gfor_fndecl_in_pack = gfc_build_library_function_decl (
         get_identifier (PREFIX("internal_pack")),
@@ -3186,7 +3184,6 @@ gfc_generate_function_code (gfc_namespace * ns)
      runtime library Fortran language standard parameters.  */
   if (sym->attr.is_main_program)
     {
-      tree gfc_c_int_type_node = gfc_get_int_type (gfc_c_int_kind);
       tree array_type, array, var;
 
       /* Passing a new option to the library requires four modifications:
@@ -3196,28 +3193,28 @@ gfc_generate_function_code (gfc_namespace * ns)
             gfor_fndecl_set_options
           + modify the library (runtime/compile_options.c)!  */
       array = tree_cons (NULL_TREE,
-                        build_int_cst (gfc_c_int_type_node,
+                        build_int_cst (integer_type_node,
                                        gfc_option.warn_std), NULL_TREE);
       array = tree_cons (NULL_TREE,
-                        build_int_cst (gfc_c_int_type_node,
+                        build_int_cst (integer_type_node,
                                        gfc_option.allow_std), array);
       array = tree_cons (NULL_TREE,
-                        build_int_cst (gfc_c_int_type_node, pedantic), array);
+                        build_int_cst (integer_type_node, pedantic), array);
       array = tree_cons (NULL_TREE,
-                        build_int_cst (gfc_c_int_type_node,
+                        build_int_cst (integer_type_node,
                                        gfc_option.flag_dump_core), array);
       array = tree_cons (NULL_TREE,
-                        build_int_cst (gfc_c_int_type_node,
+                        build_int_cst (integer_type_node,
                                        gfc_option.flag_backtrace), array);
       array = tree_cons (NULL_TREE,
-                        build_int_cst (gfc_c_int_type_node,
+                        build_int_cst (integer_type_node,
                                        gfc_option.flag_sign_zero), array);
 
       array = tree_cons (NULL_TREE,
-                        build_int_cst (gfc_c_int_type_node,
+                        build_int_cst (integer_type_node,
                                        flag_bounds_check), array);
 
-      array_type = build_array_type (gfc_c_int_type_node,
+      array_type = build_array_type (integer_type_node,
                                     build_index_type (build_int_cst (NULL_TREE,
                                                                      6)));
       array = build_constructor_from_list (array_type, nreverse (array));
@@ -3235,7 +3232,7 @@ gfc_generate_function_code (gfc_namespace * ns)
       var = gfc_build_addr_expr (pvoid_type_node, var);
 
       tmp = build_call_expr (gfor_fndecl_set_options, 2,
-                            build_int_cst (gfc_c_int_type_node, 7), var);
+                            build_int_cst (integer_type_node, 7), var);
       gfc_add_expr_to_block (&body, tmp);
     }
 
@@ -3244,9 +3241,8 @@ gfc_generate_function_code (gfc_namespace * ns)
      needed.  */
   if (sym->attr.is_main_program && gfc_option.fpe != 0)
     {
-      tree gfc_c_int_type_node = gfc_get_int_type (gfc_c_int_kind);
       tmp = build_call_expr (gfor_fndecl_set_fpe, 1,
-                            build_int_cst (gfc_c_int_type_node,
+                            build_int_cst (integer_type_node,
                                            gfc_option.fpe));
       gfc_add_expr_to_block (&body, tmp);
     }
@@ -3256,9 +3252,8 @@ gfc_generate_function_code (gfc_namespace * ns)
 
   if (sym->attr.is_main_program && gfc_option.convert != CONVERT_NATIVE)
     {
-      tree gfc_c_int_type_node = gfc_get_int_type (gfc_c_int_kind);
       tmp = build_call_expr (gfor_fndecl_set_convert, 1,
-                            build_int_cst (gfc_c_int_type_node,
+                            build_int_cst (integer_type_node,
                                            gfc_option.convert));
       gfc_add_expr_to_block (&body, tmp);
     }
@@ -3268,21 +3263,17 @@ gfc_generate_function_code (gfc_namespace * ns)
 
   if (sym->attr.is_main_program && gfc_option.record_marker != 0)
     {
-      tree gfc_c_int_type_node = gfc_get_int_type (gfc_c_int_kind);
       tmp = build_call_expr (gfor_fndecl_set_record_marker, 1,
-                            build_int_cst (gfc_c_int_type_node,
+                            build_int_cst (integer_type_node,
                                            gfc_option.record_marker));
       gfc_add_expr_to_block (&body, tmp);
     }
 
   if (sym->attr.is_main_program && gfc_option.max_subrecord_length != 0)
     {
-      tree gfc_c_int_type_node;
-
-      gfc_c_int_type_node = gfc_get_int_type (gfc_c_int_kind);
       tmp = build_call_expr (gfor_fndecl_set_max_subrecord_length,
                             1,
-                            build_int_cst (gfc_c_int_type_node,
+                            build_int_cst (integer_type_node,
                                            gfc_option.max_subrecord_length));
       gfc_add_expr_to_block (&body, tmp);
     }
index adc7bc175de9523d039213438fd12eae4397ad5b..f1ea931aacdf89fffe74eff13f9c5418a40a11c6 100644 (file)
@@ -276,7 +276,6 @@ gfc_build_io_library_fndecls (void)
   tree types[IOPARM_type_num], pad_idx, gfc_int4_type_node;
   tree gfc_intio_type_node;
   tree parm_type, dt_parm_type;
-  tree gfc_c_int_type_node;
   HOST_WIDE_INT pad_size;
   enum ioparam_type ptype;
 
@@ -300,8 +299,6 @@ gfc_build_io_library_fndecls (void)
   TYPE_ALIGN (types[IOPARM_type_pad]) = MAX (TYPE_ALIGN (pchar_type_node),
                     TYPE_ALIGN (gfc_get_int_type (gfc_max_integer_kind)));
 
-  gfc_c_int_type_node = gfc_get_int_type (gfc_c_int_kind);
-
   for (ptype = IOPARM_ptype_common; ptype < IOPARM_ptype_num; ptype++)
     gfc_build_st_parameter (ptype, types);
 
@@ -342,7 +339,7 @@ gfc_build_io_library_fndecls (void)
     gfc_build_library_function_decl (get_identifier
                                     (PREFIX("transfer_array")),
                                     void_type_node, 4, dt_parm_type,
-                                    pvoid_type_node, gfc_c_int_type_node,
+                                    pvoid_type_node, integer_type_node,
                                     gfc_charlen_type_node);
 
   /* Library entry points */
index b19631524b9b8eda9986b0ff4faa329fd07deb2c..0ec1435dad410d4c0a06866449be388d79ece642 100644 (file)
@@ -1320,7 +1320,6 @@ static tree
 gfc_trans_character_select (gfc_code *code)
 {
   tree init, node, end_label, tmp, type, case_num, label;
-  tree gfc_c_int_type_node = gfc_get_int_type (gfc_c_int_kind);
   stmtblock_t block, body;
   gfc_case *cp, *d;
   gfc_code *c;
@@ -1351,7 +1350,7 @@ gfc_trans_character_select (gfc_code *code)
       ADD_FIELD (string2, pchar_type_node);
       ADD_FIELD (string2_len, gfc_int4_type_node);
 
-      ADD_FIELD (target, gfc_c_int_type_node);
+      ADD_FIELD (target, integer_type_node);
 #undef ADD_FIELD
 
       gfc_finish_type (select_struct);
@@ -1425,7 +1424,7 @@ gfc_trans_character_select (gfc_code *code)
           node = tree_cons (ss_string2_len, se.string_length, node);
         }
 
-      node = tree_cons (ss_target, build_int_cst (gfc_c_int_type_node, d->n),
+      node = tree_cons (ss_target, build_int_cst (integer_type_node, d->n),
                        node);
 
       tmp = build_constructor_from_list (select_struct, nreverse (node));
@@ -1459,7 +1458,7 @@ gfc_trans_character_select (gfc_code *code)
   tmp = build_call_expr (gfor_fndecl_select_string, 4, init,
                         build_int_cst (NULL_TREE, n), se.expr,
                         se.string_length);
-  case_num = gfc_create_var (gfc_c_int_type_node, "case_num");
+  case_num = gfc_create_var (integer_type_node, "case_num");
   gfc_add_modify_expr (&block, case_num, tmp);
 
   gfc_add_block_to_block (&block, &se.post);