Commit b4c33883 by Andrew Pinski Committed by Andrew Pinski

re PR c/19472 (compiler internal error: in var_ann, at tree-flow-inline.h:34)

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.

From-SVN: r93840
parent 56015cee
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 David Edelsohn <edelsohn@gnu.org> 2005-01-18 David Edelsohn <edelsohn@gnu.org>
* config/rs6000/aix43.h (CPLUSPLUS_CPP_SPEC): Delete * config/rs6000/aix43.h (CPLUSPLUS_CPP_SPEC): Delete
......
...@@ -6335,8 +6335,14 @@ build_asm_expr (tree string, tree outputs, tree inputs, tree clobbers, ...@@ -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, /* If the operand is going to end up in memory,
mark it addressable. */ mark it addressable. */
if (!allows_reg && allows_mem && !c_mark_addressable (input)) if (!allows_reg && allows_mem)
input = error_mark_node; {
/* 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 else
input = error_mark_node; input = error_mark_node;
......
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 Kazu Hirata <kazu@cs.umass.edu> 2005-01-18 Kazu Hirata <kazu@cs.umass.edu>
* Make-lang.in, call.c, cvt.c, init.c, rtti.c, tree.c, * Make-lang.in, call.c, cvt.c, init.c, rtti.c, tree.c,
......
...@@ -1206,8 +1206,14 @@ finish_asm_stmt (int volatile_p, tree string, tree output_operands, ...@@ -1206,8 +1206,14 @@ finish_asm_stmt (int volatile_p, tree string, tree output_operands,
{ {
/* If the operand is going to end up in memory, /* If the operand is going to end up in memory,
mark it addressable. */ mark it addressable. */
if (!allows_reg && allows_mem && !cxx_mark_addressable (operand)) if (!allows_reg && allows_mem)
operand = error_mark_node; {
/* Strip the nops as we allow this case. FIXME, this really
should be rejected or made deprecated. */
STRIP_NOPS (operand);
if (!cxx_mark_addressable (operand))
operand = error_mark_node;
}
} }
else else
operand = error_mark_node; operand = error_mark_node;
......
2005-01-18 Andrew Pinski <pinskia@physics.uc.edu>
PR c/19472
* gcc.dg/asm-a.c: New test.
2005-01-18 Kaz Kojima <kkojima@gcc.gnu.org> 2005-01-18 Kaz Kojima <kkojima@gcc.gnu.org>
* gcc.dg/sh-relax.c: Add prototype for abort. * gcc.dg/sh-relax.c: Add prototype for abort.
......
/* { dg-require-effective-target ilp32 } */
/* { dg-options "-O2" } */
/* The problem was we were not striping the long cast here.
Note this really should be invalid code but not for the
current release (4.0) as we have people using it. */
void blockCopy_MMX2(int*);
void postProcess_MMX2()
{
int c, x,y, width;
asm( "" :: "m" ((long)x));
blockCopy_MMX2(&c);
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment