summaryrefslogtreecommitdiffstats
path: root/gcc/fortran/trans-common.c
diff options
context:
space:
mode:
authorjb <jb@138bc75d-0d04-0410-961f-82ee72b054a4>2011-04-19 17:42:51 +0000
committerjb <jb@138bc75d-0d04-0410-961f-82ee72b054a4>2011-04-19 17:42:51 +0000
commitdfa3fb6ab6ee3a6ad8c96ab3ca796fb645cc6afd (patch)
tree8ec237a8fb4cca5124b47fb04acac619c6387e9a /gcc/fortran/trans-common.c
parent046f323efd9149bb5d2d5638466e98ed238b7635 (diff)
downloadppe42-gcc-dfa3fb6ab6ee3a6ad8c96ab3ca796fb645cc6afd.tar.gz
ppe42-gcc-dfa3fb6ab6ee3a6ad8c96ab3ca796fb645cc6afd.zip
Replace gfc_getmem with XCNEW, XCNEWVEC or xcalloc
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@172728 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/fortran/trans-common.c')
-rw-r--r--gcc/fortran/trans-common.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/gcc/fortran/trans-common.c b/gcc/fortran/trans-common.c
index a2b26054665..b6318b707ca 100644
--- a/gcc/fortran/trans-common.c
+++ b/gcc/fortran/trans-common.c
@@ -133,7 +133,7 @@ get_segment_info (gfc_symbol * sym, HOST_WIDE_INT offset)
gfc_conv_const_charlen (sym->ts.u.cl);
/* Create the segment_info and fill it in. */
- s = (segment_info *) gfc_getmem (sizeof (segment_info));
+ s = XCNEW (segment_info);
s->sym = sym;
/* We will use this type when building the segment aggregate type. */
s->field = gfc_sym_type (sym);
@@ -155,14 +155,14 @@ copy_equiv_list_to_ns (segment_info *c)
gfc_equiv_info *s;
gfc_equiv_list *l;
- l = (gfc_equiv_list *) gfc_getmem (sizeof (gfc_equiv_list));
+ l = XCNEW (gfc_equiv_list);
l->next = c->sym->ns->equiv_lists;
c->sym->ns->equiv_lists = l;
for (f = c; f; f = f->next)
{
- s = (gfc_equiv_info *) gfc_getmem (sizeof (gfc_equiv_info));
+ s = XCNEW (gfc_equiv_info);
s->next = l->equiv;
l->equiv = s;
s->sym = f->sym;
@@ -505,8 +505,8 @@ get_init_field (segment_info *head, tree union_type, tree *field_init,
/* Now absorb all the initializer data into a single vector,
whilst checking for overlapping, unequal values. */
- data = (unsigned char*)gfc_getmem ((size_t)length);
- chk = (unsigned char*)gfc_getmem ((size_t)length);
+ data = XCNEWVEC (unsigned char, (size_t)length);
+ chk = XCNEWVEC (unsigned char, (size_t)length);
/* TODO - change this when default initialization is implemented. */
memset (data, '\0', (size_t)length);
OpenPOWER on IntegriCloud