+2008-02-20 Jerry DeLisle <jvdelisle@gcc.gnu.org>
+
+ PR fortran/34907
+ * iresolve.c (resolve_mask_arg): Add gfc_clear_ts to initialize
+ structure.
+ (gfc_resolve_aint): Likewise.
+ (gfc_resolve_anint): Likewise.
+ (gfc_resolve_besn): Likewise.
+ (gfc_resolve_cshift): Likewise.
+ (gfc_resolve_ctime): Likewise.
+ (gfc_resolve_eoshift): Likewise.
+ (gfc_resolve_index_func): Likewise.
+ (gfc_resolve_isatty): Likewise.
+ (gfc_resolve_malloc): Likewise.
+ (gfc_resolve_rrspacing): Likewise.
+ (gfc_resolve_scale): Likewise.
+ (gfc_resolve_set_exponent): Likewise.
+ (gfc_resolve_spacing): Likewise.
+ (gfc_resolve_spacing): Likewise.
+ (gfc_resolve_fgetc): Likewise.
+ (gfc_resolve_fputc): Likewise.
+ (gfc_resolve_ftell): Likewise.
+ (gfc_resolve_ttynam): Likewise.
+ (gfc_resolve_alarm_sub): Likewise.
+ (gfc_resolve_mvbits): Likewise.
+ (gfc_resolve_getarg): Likewise.
+ (gfc_resolve_signal_sub): Likewise.
+ (gfc_resolve_exit): Likewise.
+ (gfc_resolve_flush): Likewise.
+ (gfc_resolve_free): Likewise.
+ (gfc_resolve_ctime_sub): Likewise.
+ (gfc_resolve_fgetc_sub): Likewise.
+ (gfc_resolve_fputc_sub): Likewise.
+ (gfc_resolve_fseek_sub): Likewise.
+ (gfc_resolve_ftell_sub): Likewise.
+ (gfc_resolve_ttynam_sub): Likewise.
+
2008-02-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* gfc-internals.texi: Fix typos and markup nits.
{
gfc_typespec ts;
+ gfc_clear_ts (&ts);
if (mask->rank == 0)
{
gfc_resolve_aint (gfc_expr *f, gfc_expr *a, gfc_expr *kind)
{
gfc_typespec ts;
+ gfc_clear_ts (&ts);
f->ts.type = a->ts.type;
f->ts.kind = (kind == NULL) ? a->ts.kind : mpz_get_si (kind->value.integer);
gfc_resolve_anint (gfc_expr *f, gfc_expr *a, gfc_expr *kind)
{
gfc_typespec ts;
+ gfc_clear_ts (&ts);
f->ts.type = a->ts.type;
f->ts.kind = (kind == NULL) ? a->ts.kind : mpz_get_si (kind->value.integer);
gfc_resolve_besn (gfc_expr *f, gfc_expr *n, gfc_expr *x)
{
gfc_typespec ts;
+ gfc_clear_ts (&ts);
f->ts = x->ts;
if (n->ts.kind != gfc_c_int_kind)
if (shift->ts.kind < m)
{
gfc_typespec ts;
+ gfc_clear_ts (&ts);
ts.type = BT_INTEGER;
ts.kind = m;
gfc_convert_type_warn (shift, &ts, 2, 0);
gfc_resolve_ctime (gfc_expr *f, gfc_expr *time)
{
gfc_typespec ts;
+ gfc_clear_ts (&ts);
f->ts.type = BT_CHARACTER;
f->ts.kind = gfc_default_character_kind;
if (shift->ts.kind < m)
{
gfc_typespec ts;
+ gfc_clear_ts (&ts);
ts.type = BT_INTEGER;
ts.kind = m;
gfc_convert_type_warn (shift, &ts, 2, 0);
gfc_expr *kind)
{
gfc_typespec ts;
+ gfc_clear_ts (&ts);
f->ts.type = BT_INTEGER;
if (kind)
gfc_resolve_isatty (gfc_expr *f, gfc_expr *u)
{
gfc_typespec ts;
+ gfc_clear_ts (&ts);
f->ts.type = BT_LOGICAL;
f->ts.kind = gfc_default_integer_kind;
if (size->ts.kind < gfc_index_integer_kind)
{
gfc_typespec ts;
+ gfc_clear_ts (&ts);
ts.type = BT_INTEGER;
ts.kind = gfc_index_integer_kind;
if (prec->expr->ts.kind != gfc_c_int_kind)
{
gfc_typespec ts;
+ gfc_clear_ts (&ts);
ts.type = BT_INTEGER;
ts.kind = gfc_c_int_kind;
gfc_convert_type (prec->expr, &ts, 2);
if (i->ts.kind != gfc_c_int_kind)
{
gfc_typespec ts;
+ gfc_clear_ts (&ts);
ts.type = BT_INTEGER;
ts.kind = gfc_c_int_kind;
gfc_convert_type_warn (i, &ts, 2, 0);
if (i->ts.kind != gfc_c_int_kind)
{
gfc_typespec ts;
+ gfc_clear_ts (&ts);
ts.type = BT_INTEGER;
ts.kind = gfc_c_int_kind;
gfc_convert_type_warn (i, &ts, 2, 0);
if (emin_1->expr->ts.kind != gfc_c_int_kind)
{
gfc_typespec ts;
+ gfc_clear_ts (&ts);
ts.type = BT_INTEGER;
ts.kind = gfc_c_int_kind;
gfc_convert_type (emin_1->expr, &ts, 2);
if (prec->expr->ts.kind != gfc_c_int_kind)
{
gfc_typespec ts;
+ gfc_clear_ts (&ts);
ts.type = BT_INTEGER;
ts.kind = gfc_c_int_kind;
gfc_convert_type (prec->expr, &ts, 2);
gfc_resolve_fgetc (gfc_expr *f, gfc_expr *u, gfc_expr *c ATTRIBUTE_UNUSED)
{
gfc_typespec ts;
+ gfc_clear_ts (&ts);
f->ts.type = BT_INTEGER;
f->ts.kind = gfc_c_int_kind;
gfc_resolve_fputc (gfc_expr *f, gfc_expr *u, gfc_expr *c ATTRIBUTE_UNUSED)
{
gfc_typespec ts;
+ gfc_clear_ts (&ts);
f->ts.type = BT_INTEGER;
f->ts.kind = gfc_c_int_kind;
gfc_resolve_ftell (gfc_expr *f, gfc_expr *u)
{
gfc_typespec ts;
+ gfc_clear_ts (&ts);
f->ts.type = BT_INTEGER;
f->ts.kind = gfc_index_integer_kind;
gfc_resolve_ttynam (gfc_expr *f, gfc_expr *unit)
{
gfc_typespec ts;
+ gfc_clear_ts (&ts);
f->ts.type = BT_CHARACTER;
f->ts.kind = gfc_default_character_kind;
const char *name;
gfc_expr *seconds, *handler, *status;
gfc_typespec ts;
+ gfc_clear_ts (&ts);
seconds = c->ext.actual->expr;
handler = c->ext.actual->next->expr;
{
const char *name;
gfc_typespec ts;
+ gfc_clear_ts (&ts);
/* FROMPOS, LEN and TOPOS are restricted to small values. As such,
they will be converted so that they fit into a C int. */
if (c->ext.actual->expr->ts.kind != gfc_default_integer_kind)
{
gfc_typespec ts;
+ gfc_clear_ts (&ts);
ts.type = BT_INTEGER;
ts.kind = gfc_default_integer_kind;
const char *name;
gfc_expr *number, *handler, *status;
gfc_typespec ts;
+ gfc_clear_ts (&ts);
number = c->ext.actual->expr;
handler = c->ext.actual->next->expr;
const char *name;
gfc_typespec ts;
gfc_expr *n;
+ gfc_clear_ts (&ts);
/* The STATUS argument has to be of default kind. If it is not,
we convert it. */
const char *name;
gfc_typespec ts;
gfc_expr *n;
+ gfc_clear_ts (&ts);
ts.type = BT_INTEGER;
ts.kind = gfc_default_integer_kind;
{
gfc_typespec ts;
gfc_expr *n;
+ gfc_clear_ts (&ts);
ts.type = BT_INTEGER;
ts.kind = gfc_index_integer_kind;
gfc_resolve_ctime_sub (gfc_code *c)
{
gfc_typespec ts;
+ gfc_clear_ts (&ts);
/* ctime TIME argument is a INTEGER(KIND=8), says the doc */
if (c->ext.actual->expr->ts.kind != 8)
const char *name;
gfc_typespec ts;
gfc_expr *u, *st;
+ gfc_clear_ts (&ts);
u = c->ext.actual->expr;
st = c->ext.actual->next->next->expr;
const char *name;
gfc_typespec ts;
gfc_expr *u, *st;
+ gfc_clear_ts (&ts);
u = c->ext.actual->expr;
st = c->ext.actual->next->next->expr;
gfc_expr *whence;
gfc_expr *status;
gfc_typespec ts;
+ gfc_clear_ts (&ts);
unit = c->ext.actual->expr;
offset = c->ext.actual->next->expr;
gfc_expr *unit;
gfc_expr *offset;
gfc_typespec ts;
+ gfc_clear_ts (&ts);
unit = c->ext.actual->expr;
offset = c->ext.actual->next->expr;
gfc_resolve_ttynam_sub (gfc_code *c)
{
gfc_typespec ts;
+ gfc_clear_ts (&ts);
if (c->ext.actual->expr->ts.kind != gfc_c_int_kind)
{