summaryrefslogtreecommitdiffstats
path: root/gcc/c-typeck.c
diff options
context:
space:
mode:
authorpinskia <pinskia@138bc75d-0d04-0410-961f-82ee72b054a4>2005-01-18 17:52:33 +0000
committerpinskia <pinskia@138bc75d-0d04-0410-961f-82ee72b054a4>2005-01-18 17:52:33 +0000
commitc6e95001ce62c0f7797461b3acd79b0dd85f90f9 (patch)
tree40a09ff51423bf68a0d6f2772f26d18edcd6a83a /gcc/c-typeck.c
parent2cf1428aca276558ed7c71ad1a97ab3f59b91dc4 (diff)
downloadppe42-gcc-c6e95001ce62c0f7797461b3acd79b0dd85f90f9.tar.gz
ppe42-gcc-c6e95001ce62c0f7797461b3acd79b0dd85f90f9.zip
2005-01-18 Andrew Pinski <pinskia@physics.uc.edu>
PR c/19472 * semantics.c (finish_asm_stmt): Strip nops off input memory operands. 2005-01-18 Andrew Pinski <pinskia@physics.uc.edu> PR C/19472 * c-typeck.c (build_asm_expr): Strip nops off input memory operands. 2005-01-18 Andrew Pinski <pinskia@physics.uc.edu> PR C/19472 * gcc.dg/asm-a.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@93840 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/c-typeck.c')
-rw-r--r--gcc/c-typeck.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/gcc/c-typeck.c b/gcc/c-typeck.c
index 2b065023aa5..f26e3868813 100644
--- a/gcc/c-typeck.c
+++ b/gcc/c-typeck.c
@@ -6335,8 +6335,14 @@ build_asm_expr (tree string, tree outputs, tree inputs, tree clobbers,
{
/* If the operand is going to end up in memory,
mark it addressable. */
- if (!allows_reg && allows_mem && !c_mark_addressable (input))
- input = error_mark_node;
+ if (!allows_reg && allows_mem)
+ {
+ /* Strip the nops as we allow this case. FIXME, this really
+ should be rejected or made deprecated. */
+ STRIP_NOPS (input);
+ if (!c_mark_addressable (input))
+ input = error_mark_node;
+ }
}
else
input = error_mark_node;
OpenPOWER on IntegriCloud