summaryrefslogtreecommitdiff
path: root/gcc/stmt.c
diff options
context:
space:
mode:
authorlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>1999-09-07 05:49:18 +0000
committerlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>1999-09-07 05:49:18 +0000
commit7014838cdd847f5d22f8b4bff0285ad622b707b5 (patch)
treef1a67b6ea75a7f0da3f06e0a1c60b213f4403168 /gcc/stmt.c
parent713829e97b2cabe9369424002f6efb23a7c86aba (diff)
downloadgcc-7014838cdd847f5d22f8b4bff0285ad622b707b5.tar.gz
Merge in gcc2-ss-010999
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@29150 138bc75d-0d04-0410-961f-82ee72b054a4
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 a9f859237c2..92050e97305 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;