mirror of
git://gcc.gnu.org/git/gcc.git
synced 2024-12-30 10:14:53 +08:00
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:
parent
6d2f9dd377
commit
a46666a950
@ -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
|
||||
|
16
gcc/expr.c
16
gcc/expr.c
@ -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 ... */
|
||||
|
||||
|
@ -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
|
||||
|
27
gcc/testsuite/gcc.c-torture/compile/20030410-1.c
Normal file
27
gcc/testsuite/gcc.c-torture/compile/20030410-1.c
Normal 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;
|
||||
}
|
Loading…
Reference in New Issue
Block a user