mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-03-19 08:30:28 +08:00
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
This commit is contained in:
parent
2d25605a54
commit
9c85868198
@ -1,3 +1,8 @@
|
||||
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.
|
||||
|
15
gcc/stmt.c
15
gcc/stmt.c
@ -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)
|
||||
|
@ -1,3 +1,7 @@
|
||||
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.
|
||||
|
7
gcc/testsuite/gcc.dg/tls/asm-1.c
Normal file
7
gcc/testsuite/gcc.dg/tls/asm-1.c
Normal file
@ -0,0 +1,7 @@
|
||||
/* { dg-options "-Werror" } */
|
||||
__thread int i;
|
||||
|
||||
int foo ()
|
||||
{
|
||||
asm volatile ("" :: "m" (&i)); /* { dg-error "lvalue" } */
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user