re PR c/10201 ([IA64] ICE in int_mode_for_mode, at stor-layout.c)

PR c/10201
        * expr.c (expand_expr): Move DECL_RTL frobbing ...
        * stor-layout.c (layout_decl): ... here.

From-SVN: r65467
This commit is contained in:
Richard Henderson 2003-04-11 09:22:29 -07:00 committed by Richard Henderson
parent 6d2f9dd377
commit a46666a950
4 changed files with 46 additions and 15 deletions

View File

@ -1,3 +1,9 @@
2003-04-11 Richard Henderson <rth@redhat.com>
PR c/10201
* expr.c (expand_expr): Move DECL_RTL frobbing ...
* stor-layout.c (layout_decl): ... here.
2003-04-11 James A. Morrison <ja2morri@uwaterloo.ca>
* doc/invoke.texi: Eliminate extra white-space caused by

View File

@ -6714,21 +6714,7 @@ expand_expr (exp, target, tmode, modifier)
but the type is complete now, lay out the decl now. */
if (DECL_SIZE (exp) == 0 && COMPLETE_TYPE_P (TREE_TYPE (exp))
&& (TREE_STATIC (exp) || DECL_EXTERNAL (exp)))
{
rtx value = DECL_RTL_IF_SET (exp);
layout_decl (exp, 0);
/* If the RTL was already set, update its mode and memory
attributes. */
if (value != 0)
{
PUT_MODE (value, DECL_MODE (exp));
SET_DECL_RTL (exp, 0);
set_mem_attributes (value, exp, 1);
SET_DECL_RTL (exp, value);
}
}
layout_decl (exp, 0);
/* ... fall through ... */

View File

@ -390,6 +390,7 @@ layout_decl (decl, known_align)
{
tree type = TREE_TYPE (decl);
enum tree_code code = TREE_CODE (decl);
rtx rtl = NULL_RTX;
if (code == CONST_DECL)
return;
@ -397,6 +398,8 @@ layout_decl (decl, known_align)
&& code != TYPE_DECL && code != FIELD_DECL)
abort ();
rtl = DECL_RTL_IF_SET (decl);
if (type == error_mark_node)
type = void_type_node;
@ -542,6 +545,15 @@ layout_decl (decl, known_align)
larger_than_size);
}
}
/* If the RTL was already set, update its mode and mem attributes. */
if (rtl)
{
PUT_MODE (rtl, DECL_MODE (decl));
SET_DECL_RTL (decl, 0);
set_mem_attributes (rtl, decl, 1);
SET_DECL_RTL (decl, rtl);
}
}
/* Hook for a front-end function that can modify the record layout as needed

View File

@ -0,0 +1,27 @@
/* PR 10201 */
extern struct _zend_compiler_globals compiler_globals;
typedef struct _zend_executor_globals zend_executor_globals;
extern zend_executor_globals executor_globals;
typedef struct _zend_ptr_stack {
int top;
void **top_element;
} zend_ptr_stack;
struct _zend_compiler_globals {
};
struct _zend_executor_globals {
int *uninitialized_zval_ptr;
zend_ptr_stack argument_stack;
};
static inline void safe_free_zval_ptr(int *p)
{
if (p!=(executor_globals.uninitialized_zval_ptr)) {
}
}
zend_executor_globals executor_globals;
static inline void zend_ptr_stack_clear_multiple(void)
{
executor_globals.argument_stack.top -= 2;
}