* [Patch, fortran] Avoid creating unnecessary type node
@ 2007-07-26 14:27 Janne Blomqvist
0 siblings, 0 replies; only message in thread
From: Janne Blomqvist @ 2007-07-26 14:27 UTC (permalink / raw)
To: gfortran, gcc-patches
[-- Attachment #1: Type: text/plain, Size: 212 bytes --]
Hi,
another obvious patch that I intend to commit in 24h, unless objections
arise. We don't need to create tree gfc_index_int_type_node, which is
identical to tree gfc_array_index_type.
--
Janne Blomqvist
[-- Attachment #2: ChangeLog --]
[-- Type: text/plain, Size: 203 bytes --]
2007-07-26 Janne Blomqvist <jb@gcc.gnu.org>
* trans-decl.c (gfc_build_builtin_function_decls): Use existing
gfc_array_index_type rather than creating another typenode for
gfc_index_integer_kind.
[-- Attachment #3: alloc-cleanup3.diff --]
[-- Type: text/x-patch, Size: 1367 bytes --]
Index: trans-decl.c
===================================================================
--- trans-decl.c (revision 126947)
+++ trans-decl.c (working copy)
@@ -2283,24 +2283,23 @@ gfc_build_builtin_function_decls (void)
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);
- tree gfc_index_int_type_node = gfc_get_int_type (gfc_index_integer_kind);
gfor_fndecl_internal_realloc =
gfc_build_library_function_decl (get_identifier
(PREFIX("internal_realloc")),
pvoid_type_node, 2, pvoid_type_node,
- gfc_index_int_type_node);
+ gfc_array_index_type);
gfor_fndecl_allocate =
gfc_build_library_function_decl (get_identifier (PREFIX("allocate")),
pvoid_type_node, 2,
- gfc_index_int_type_node, gfc_pint4_type_node);
+ gfc_array_index_type, gfc_pint4_type_node);
DECL_IS_MALLOC (gfor_fndecl_allocate) = 1;
gfor_fndecl_allocate_array =
gfc_build_library_function_decl (get_identifier (PREFIX("allocate_array")),
pvoid_type_node, 3, pvoid_type_node,
- gfc_index_int_type_node, gfc_pint4_type_node);
+ gfc_array_index_type, gfc_pint4_type_node);
DECL_IS_MALLOC (gfor_fndecl_allocate_array) = 1;
gfor_fndecl_deallocate =
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2007-07-26 14:25 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-07-26 14:27 [Patch, fortran] Avoid creating unnecessary type node Janne Blomqvist
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).