diff options
author | Richard Kenner <kenner@gcc.gnu.org> | 1993-05-31 21:45:53 -0400 |
---|---|---|
committer | Richard Kenner <kenner@gcc.gnu.org> | 1993-05-31 21:45:53 -0400 |
commit | d49debfe04c7afdf4a1a59ae8bfad1652ef84a82 (patch) | |
tree | 509a2ca4759b03a622aff131846af7b374cadb99 | |
parent | 433deffc3a606c5e08c50d27057852cbdab0230b (diff) | |
download | gcc-d49debfe04c7afdf4a1a59ae8bfad1652ef84a82.zip gcc-d49debfe04c7afdf4a1a59ae8bfad1652ef84a82.tar.gz gcc-d49debfe04c7afdf4a1a59ae8bfad1652ef84a82.tar.bz2 |
(output_epilog): Don't crash if TYPE_SIZE of an arg is not set.
From-SVN: r4614
-rw-r--r-- | gcc/config/romp/romp.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/gcc/config/romp/romp.c b/gcc/config/romp/romp.c index f2f5195..712929c 100644 --- a/gcc/config/romp/romp.c +++ b/gcc/config/romp/romp.c @@ -1,5 +1,5 @@ /* Subroutines used for code generation on ROMP. - Copyright (C) 1990, 1991, 1992 Free Software Foundation, Inc. + Copyright (C) 1990, 1991, 1992, 1993 Free Software Foundation, Inc. Contributed by Richard Kenner (kenner@nyu.edu) This file is part of GNU CC. @@ -1144,10 +1144,18 @@ output_epilog (file, size) int nargs = 0; /* words of arguments */ tree argptr; + /* Compute the number of words of arguments. Since this is just for + the traceback table, we ignore arguments that don't have a size or + don't have a fixed size. */ + for (argptr = DECL_ARGUMENTS (current_function_decl); argptr; argptr = TREE_CHAIN (argptr)) - nargs += ((TREE_INT_CST_LOW (TYPE_SIZE (TREE_TYPE (argptr))) - + BITS_PER_WORD - 1) / BITS_PER_WORD); + { + int this_size = int_size_in_bytes (TREE_TYPE (argptr)); + + if (this_size > 0) + nargs += (this_size + UNITS_PER_WORD - 1) / UNITS_PER_WORD; + } /* If the last insn was a BARRIER, we don't have to write anything except the trace table. */ |