diff options
author | Janne Blomqvist <jb@gcc.gnu.org> | 2011-04-19 20:42:51 +0300 |
---|---|---|
committer | Janne Blomqvist <jb@gcc.gnu.org> | 2011-04-19 20:42:51 +0300 |
commit | 93acb62caabb343900fb68d3bd76dd36406a7ad4 (patch) | |
tree | 8ec237a8fb4cca5124b47fb04acac619c6387e9a /gcc/fortran/trans-common.c | |
parent | 60bea929924f57c886ee5380d24bfe6640030d54 (diff) | |
download | gcc-93acb62caabb343900fb68d3bd76dd36406a7ad4.zip gcc-93acb62caabb343900fb68d3bd76dd36406a7ad4.tar.gz gcc-93acb62caabb343900fb68d3bd76dd36406a7ad4.tar.bz2 |
Replace gfc_getmem with XCNEW, XCNEWVEC or xcalloc
From-SVN: r172728
Diffstat (limited to 'gcc/fortran/trans-common.c')
-rw-r--r-- | gcc/fortran/trans-common.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/gcc/fortran/trans-common.c b/gcc/fortran/trans-common.c index a2b2605..b6318b7 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); |