summaryrefslogtreecommitdiff
path: root/gcc/stmt.c
diff options
context:
space:
mode:
authorrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>2006-11-11 09:47:35 +0000
committerrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>2006-11-11 09:47:35 +0000
commit415270000addc2b8f0c541192709db7600af0290 (patch)
tree25f526bc8744496c378c59ae62869f60f01a1892 /gcc/stmt.c
parent65722ae26ebc22789952dfe8641b10cd483b8c19 (diff)
downloadgcc-415270000addc2b8f0c541192709db7600af0290.tar.gz
gcc/
PR middle-end/27528 * stmt.c (expand_asm_operands): Use EXPAND_INITIALIZER if the constraints accept neither registers or memories. gcc/testsuite/ PR middle-end/27528 * gcc.c-torture/compile/pr27528.c: New test. * gcc.dg/pr27528.c: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@118689 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/stmt.c')
-rw-r--r--gcc/stmt.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/gcc/stmt.c b/gcc/stmt.c
index 193745314ad..d5a181b9d2d 100644
--- a/gcc/stmt.c
+++ b/gcc/stmt.c
@@ -885,9 +885,13 @@ expand_asm_operands (tree string, tree outputs, tree inputs,
val = TREE_VALUE (tail);
type = TREE_TYPE (val);
+ /* EXPAND_INITIALIZER will not generate code for valid initializer
+ constants, but will still generate code for other types of operand.
+ This is the behavior we want for constant constraints. */
op = expand_expr (val, NULL_RTX, VOIDmode,
- (allows_mem && !allows_reg
- ? EXPAND_MEMORY : EXPAND_NORMAL));
+ allows_reg ? EXPAND_NORMAL
+ : allows_mem ? EXPAND_MEMORY
+ : EXPAND_INITIALIZER);
/* Never pass a CONCAT to an ASM. */
if (GET_CODE (op) == CONCAT)