diff options
author | Nathan Froyd <froydnj@codesourcery.com> | 2010-08-07 21:12:32 +0000 |
---|---|---|
committer | Nathan Froyd <froydnj@gcc.gnu.org> | 2010-08-07 21:12:32 +0000 |
commit | 2bb1fc26a11e2ca13ef8e6a42ea31f63182b0562 (patch) | |
tree | 35c9ee40c0caa738fda5ccc6b47787ea24f6ced2 /gcc/ada/gcc-interface/utils.c | |
parent | 1145e690d2eab146e53ee6577bf4c356637501d0 (diff) | |
download | gcc-2bb1fc26a11e2ca13ef8e6a42ea31f63182b0562.zip gcc-2bb1fc26a11e2ca13ef8e6a42ea31f63182b0562.tar.gz gcc-2bb1fc26a11e2ca13ef8e6a42ea31f63182b0562.tar.bz2 |
decl.c (gnat_to_gnu_entity): Use XALLOCAVEC instead of alloca.
* gcc-interface/decl.c (gnat_to_gnu_entity): Use XALLOCAVEC instead
of alloca.
(components_to_record): Likewise.
* gcc-interface/trans.c (gnat_to_gnu): Likewise.
* gcc-interface/utils.c (max_size): Likewise.
(build_vms_descriptor32): Likewise.
(build_vms_descriptor): Likewise.
From-SVN: r162985
Diffstat (limited to 'gcc/ada/gcc-interface/utils.c')
-rw-r--r-- | gcc/ada/gcc-interface/utils.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gcc/ada/gcc-interface/utils.c b/gcc/ada/gcc-interface/utils.c index eed426a..381d71b 100644 --- a/gcc/ada/gcc-interface/utils.c +++ b/gcc/ada/gcc-interface/utils.c @@ -2134,7 +2134,7 @@ max_size (tree exp, bool max_p) n = call_expr_nargs (exp); gcc_assert (n > 0); - argarray = (tree *) alloca (n * sizeof (tree)); + argarray = XALLOCAVEC (tree, n); for (i = 0; i < n; i++) argarray[i] = max_size (CALL_EXPR_ARG (exp, i), max_p); return build_call_array (type, CALL_EXPR_FN (exp), n, argarray); @@ -2317,7 +2317,7 @@ build_vms_descriptor32 (tree type, Mechanism_Type mech, Entity_Id gnat_entity) ndim++, inner_type = TREE_TYPE (inner_type)) ; - idx_arr = (tree *) alloca (ndim * sizeof (tree)); + idx_arr = XALLOCAVEC (tree, ndim); if (mech != By_Descriptor_NCA && mech != By_Short_Descriptor_NCA && TREE_CODE (type) == ARRAY_TYPE && TYPE_CONVENTION_FORTRAN_P (type)) @@ -2631,7 +2631,7 @@ build_vms_descriptor (tree type, Mechanism_Type mech, Entity_Id gnat_entity) ndim++, inner_type = TREE_TYPE (inner_type)) ; - idx_arr = (tree *) alloca (ndim * sizeof (tree)); + idx_arr = XALLOCAVEC (tree, ndim); if (mech != By_Descriptor_NCA && TREE_CODE (type) == ARRAY_TYPE && TYPE_CONVENTION_FORTRAN_P (type)) |