Commit 9c858681 by Richard Sandiford Committed by Richard Sandiford

stmt.c (expand_asm_operands): Check whether force_const_mem succeeded.

	* stmt.c (expand_asm_operands): Check whether force_const_mem
	succeeded.

testsuite/
	* gcc.dg/tls/asm-1.C: New test.

From-SVN: r74035
parent 2d25605a
2003-11-29 Richard Sandiford <rsandifo@redhat.com>
* stmt.c (expand_asm_operands): Check whether force_const_mem
succeeded.
2003-11-28 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* config/gnu.h (HURD_TARGET_OS_CPP_BUILTINS): New.
......
......@@ -1712,13 +1712,16 @@ expand_asm_operands (tree string, tree outputs, tree inputs,
if (CONSTANT_P (op))
{
op = force_const_mem (TYPE_MODE (type), op);
op = validize_mem (op);
rtx mem = force_const_mem (TYPE_MODE (type), op);
if (mem)
op = validize_mem (mem);
else
op = force_reg (TYPE_MODE (type), op);
}
else if (GET_CODE (op) == REG
|| GET_CODE (op) == SUBREG
|| GET_CODE (op) == ADDRESSOF
|| GET_CODE (op) == CONCAT)
if (GET_CODE (op) == REG
|| GET_CODE (op) == SUBREG
|| GET_CODE (op) == ADDRESSOF
|| GET_CODE (op) == CONCAT)
{
tree qual_type = build_qualified_type (type,
(TYPE_QUALS (type)
......
2003-11-29 Richard Sandiford <rsandifo@redhat.com>
* gcc.dg/tls/asm-1.C: New test.
2003-11-28 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* testsuite/gcc.dg/cpp/assert4.c: Update.
......
/* { dg-options "-Werror" } */
__thread int i;
int foo ()
{
asm volatile ("" :: "m" (&i)); /* { dg-error "lvalue" } */
}
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