aboutsummaryrefslogtreecommitdiff
path: root/gcc/stmt.c
diff options
context:
space:
mode:
authorRichard Sandiford <richard@codesourcery.com>2006-11-11 09:47:35 +0000
committerRichard Sandiford <rsandifo@gcc.gnu.org>2006-11-11 09:47:35 +0000
commit6d40c489243bfbdc3a5134389ff51f12b62308bc (patch)
tree25f526bc8744496c378c59ae62869f60f01a1892 /gcc/stmt.c
parent5601414805950ad6e66754a595d0a7e74fa9097c (diff)
downloadgcc-6d40c489243bfbdc3a5134389ff51f12b62308bc.zip
gcc-6d40c489243bfbdc3a5134389ff51f12b62308bc.tar.gz
gcc-6d40c489243bfbdc3a5134389ff51f12b62308bc.tar.bz2
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
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 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)