Do not creat field defs for local storage.

This prevents field params and local vars from messing up the real field
defs.
This commit is contained in:
Bill Currie 2011-03-08 19:56:02 +09:00
parent f66e20db17
commit 7c770b75c5

View file

@ -417,7 +417,7 @@ initialize_def (symbol_t *sym, type_t *type, expr_t *init, defspace_t *space,
sym->s.def = new_def (sym->name, type, space, storage);
if (type == &type_vector && options.code.vector_components)
init_vector_components (sym, 0);
if (type->type == ev_field)
if (type->type == ev_field && storage != st_local)
init_field_def (sym->s.def, init, storage);
if (storage == st_extern) {
if (init)