aboutsummaryrefslogtreecommitdiff
path: root/gcc/stmt.c
diff options
context:
space:
mode:
authorJeff Law <law@gcc.gnu.org>1999-09-06 23:49:18 -0600
committerJeff Law <law@gcc.gnu.org>1999-09-06 23:49:18 -0600
commitc5c7673583c6310e7f8e45704fdc4aadff33e393 (patch)
treef1a67b6ea75a7f0da3f06e0a1c60b213f4403168 /gcc/stmt.c
parentad85216ece38be37dacbbb3fa7bb7db69aa33a4b (diff)
downloadgcc-c5c7673583c6310e7f8e45704fdc4aadff33e393.zip
gcc-c5c7673583c6310e7f8e45704fdc4aadff33e393.tar.gz
gcc-c5c7673583c6310e7f8e45704fdc4aadff33e393.tar.bz2
Merge in gcc2-ss-010999
From-SVN: r29150
Diffstat (limited to 'gcc/stmt.c')
-rw-r--r--gcc/stmt.c29
1 files changed, 20 insertions, 9 deletions
diff --git a/gcc/stmt.c b/gcc/stmt.c
index a9f8592..92050e9 100644
--- a/gcc/stmt.c
+++ b/gcc/stmt.c
@@ -1232,7 +1232,7 @@ expand_asm (body)
{
if (current_function_check_memory_usage)
{
- error ("`asm' cannot be used with `-fcheck-memory-usage'");
+ error ("`asm' cannot be used in function where memory usage is checked");
return;
}
@@ -1301,6 +1301,12 @@ expand_asm_operands (string, outputs, inputs, clobbers, vol, filename, line)
MD_ASM_CLOBBERS (clobbers);
#endif
+ if (current_function_check_memory_usage)
+ {
+ error ("`asm' cannot be used in function where memory usage is checked");
+ return;
+ }
+
/* Count the number of meaningful clobbered registers, ignoring what
we would ignore later. */
nclobbers = 0;
@@ -1724,11 +1730,13 @@ expand_asm_operands (string, outputs, inputs, clobbers, vol, filename, line)
XVECEXP (body, 0, i)
= gen_rtx_SET (VOIDmode,
output_rtx[i],
- gen_rtx_ASM_OPERANDS (VOIDmode,
- TREE_STRING_POINTER (string),
- TREE_STRING_POINTER (TREE_PURPOSE (tail)),
- i, argvec, constraints,
- filename, line));
+ gen_rtx_ASM_OPERANDS
+ (VOIDmode,
+ TREE_STRING_POINTER (string),
+ TREE_STRING_POINTER (TREE_PURPOSE (tail)),
+ i, argvec, constraints,
+ filename, line));
+
MEM_VOLATILE_P (SET_SRC (XVECEXP (body, 0, i))) = vol;
}
@@ -1754,8 +1762,9 @@ expand_asm_operands (string, outputs, inputs, clobbers, vol, filename, line)
{
XVECEXP (body, 0, i++)
= gen_rtx_CLOBBER (VOIDmode,
- gen_rtx_MEM (BLKmode,
- gen_rtx_SCRATCH (VOIDmode)));
+ gen_rtx_MEM
+ (BLKmode,
+ gen_rtx_SCRATCH (VOIDmode)));
continue;
}
@@ -5040,7 +5049,9 @@ check_for_full_enumeration_handling (type)
bytes_needed = (size + HOST_BITS_PER_CHAR) / HOST_BITS_PER_CHAR;
if (size > 0 && size < 600000
- /* We deliberately use calloc here - not xcalloc. */
+ /* We deliberately use calloc here, not cmalloc, so that we can suppress
+ this optimization if we don't have enough memory rather than
+ aborting, as xmalloc would do. */
&& (cases_seen = (unsigned char *) calloc (bytes_needed, 1)) != NULL)
{
long i;