From 6d40c489243bfbdc3a5134389ff51f12b62308bc Mon Sep 17 00:00:00 2001 From: Richard Sandiford Date: Sat, 11 Nov 2006 09:47:35 +0000 Subject: re PR middle-end/27528 (compiling linux kernels 2.6.16.14/15 2.6.17-rc3 on powerpc (7450) get error on long exixting code) 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. From-SVN: r118689 --- gcc/stmt.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'gcc/stmt.c') diff --git a/gcc/stmt.c b/gcc/stmt.c index 1937453..d5a181b 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) -- cgit v1.1