* typeck.c (mark_addressable): Don't test TREE_ADDRESSABLE early.
Call put_var_into_stack.
* g++.dg/opt/asm1.C: New.
From-SVN: r54864
+2002-06-20 Richard Henderson <rth@redhat.com>
+
+ PR c++/6747
+ * typeck.c (mark_addressable): Don't test TREE_ADDRESSABLE early.
+ Call put_var_into_stack.
+
2002-06-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
PR c++/6892
{
register tree x = exp;
- if (TREE_ADDRESSABLE (x) == 1)
- return 1;
-
while (1)
switch (TREE_CODE (x))
{
TREE_ADDRESSABLE (x) = 1; /* so compiler doesn't die later */
return 1;
}
+ /* FALLTHRU */
+
case VAR_DECL:
/* Caller should not be trying to mark initialized
constant fields addressable. */
|| DECL_IN_AGGR_P (x) == 0
|| TREE_STATIC (x)
|| DECL_EXTERNAL (x), 314);
+ /* FALLTHRU */
case CONST_DECL:
case RESULT_DECL:
warning ("address requested for `%D', which is declared `register'",
x);
TREE_ADDRESSABLE (x) = 1;
+ put_var_into_stack (x);
return 1;
case FUNCTION_DECL: