diff -Nrcpad gcc-4.4.1/gcc/fortran/ChangeLog gcc-4.4.2/gcc/fortran/ChangeLog *** gcc-4.4.1/gcc/fortran/ChangeLog Wed Jul 22 07:28:47 2009 --- gcc-4.4.2/gcc/fortran/ChangeLog Thu Oct 15 07:39:17 2009 *************** *** 1,3 **** --- 1,65 ---- + 2009-10-15 Release Manager + + * GCC 4.4.2 released. + + 2009-10-05 Tobias Burnus + + PR fortran/41479 + (init_intent_out_dt): Call gfc_init_default_dt + for all derived types with initializers. + + 2009-10-01 Tobias Burnus + + PR fortran/41515 + * decl.c (do_parm): Call add_init_expr_to_sym. + + 2009-09-11 Steven G. Kargl + + Backported from mainline: + 2009-05-08 Janus Weil + + PR fortran/39876 + * intrinsic.c (gfc_is_intrinsic): Do not add the EXTERNAL attribute if + the symbol is a module procedure. + + + 2009-09-05 Paul Thomas + + PR fortran/41258 + * primary.c (gfc_match_varspec): Do not look for typebound + procedures unless the derived type has a f2k_derived namespace. + + 2008-08-25 Paul Thomas + + PR fortran/41062 + * trans-decl.c (gfc_trans_use_stmts): Keep going through use + list if symbol is not use associated. + + 2009-08-16 Paul Thomas + + PR fortran/40847 + * iresolve.c (gfc_resolve_transfer): Correct error in 'mold' + character length for case where length expresson is NULL. + + 2009-07-29 Tobias Burnus + + PR fortran/40851 + * resolve.c (resolve_symbol): Do not initialize pointer derived-types. + * trans-decl.c (init_intent_out_dt): Ditto. + (generate_local_decl): No need to set attr.referenced for DT pointers. + + 2009-07-28 Jakub Jelinek + + PR fortran/40878 + * openmp.c (gfc_match_omp_clauses): Use gfc_error_now instead of + gfc_error to diagnose invalid COLLAPSE arguments. + + 2009-07-23 Steven G. Kargl + + PR fortran/40727 + * fortran/check.c (gfc_check_cmplx, gfc_check_dcmplx): Add check that + the optional second argument isn't of COMPLEX type. + 2009-07-22 Release Manager * GCC 4.4.1 released. diff -Nrcpad gcc-4.4.1/gcc/fortran/check.c gcc-4.4.2/gcc/fortran/check.c *** gcc-4.4.1/gcc/fortran/check.c Fri Jan 9 23:47:55 2009 --- gcc-4.4.2/gcc/fortran/check.c Fri Jul 24 00:28:43 2009 *************** gfc_check_cmplx (gfc_expr *x, gfc_expr * *** 813,818 **** --- 813,827 ---- gfc_current_intrinsic, &y->where); return FAILURE; } + + if (y->ts.type == BT_COMPLEX) + { + gfc_error ("'%s' argument of '%s' intrinsic at %L must have a type " + "of either REAL or INTEGER", gfc_current_intrinsic_arg[1], + gfc_current_intrinsic, &y->where); + return FAILURE; + } + } if (kind_check (kind, 2, BT_COMPLEX) == FAILURE) *************** gfc_check_dcmplx (gfc_expr *x, gfc_expr *** 937,942 **** --- 946,959 ---- gfc_current_intrinsic, &y->where); return FAILURE; } + + if (y->ts.type == BT_COMPLEX) + { + gfc_error ("'%s' argument of '%s' intrinsic at %L must have a type " + "of either REAL or INTEGER", gfc_current_intrinsic_arg[1], + gfc_current_intrinsic, &y->where); + return FAILURE; + } } return SUCCESS; diff -Nrcpad gcc-4.4.1/gcc/fortran/decl.c gcc-4.4.2/gcc/fortran/decl.c *** gcc-4.4.1/gcc/fortran/decl.c Tue Dec 2 11:58:16 2008 --- gcc-4.4.2/gcc/fortran/decl.c Thu Oct 1 16:09:13 2009 *************** do_parm (void) *** 5891,5896 **** --- 5891,5897 ---- gfc_symbol *sym; gfc_expr *init; match m; + gfc_try t; m = gfc_match_symbol (&sym, 0); if (m == MATCH_NO) *************** do_parm (void) *** 5932,5966 **** goto cleanup; } ! if (sym->ts.type == BT_CHARACTER ! && sym->ts.cl != NULL ! && sym->ts.cl->length != NULL ! && sym->ts.cl->length->expr_type == EXPR_CONSTANT ! && init->expr_type == EXPR_CONSTANT ! && init->ts.type == BT_CHARACTER) ! gfc_set_constant_character_len ( ! mpz_get_si (sym->ts.cl->length->value.integer), init, -1); ! else if (sym->ts.type == BT_CHARACTER && sym->ts.cl != NULL ! && sym->ts.cl->length == NULL) ! { ! int clen; ! if (init->expr_type == EXPR_CONSTANT) ! { ! clen = init->value.character.length; ! sym->ts.cl->length = gfc_int_expr (clen); ! } ! else if (init->expr_type == EXPR_ARRAY) ! { ! gfc_expr *p = init->value.constructor->expr; ! clen = p->value.character.length; ! sym->ts.cl->length = gfc_int_expr (clen); ! } ! else if (init->ts.cl && init->ts.cl->length) ! sym->ts.cl->length = gfc_copy_expr (sym->value->ts.cl->length); ! } ! ! sym->value = init; ! return MATCH_YES; cleanup: gfc_free_expr (init); --- 5933,5940 ---- goto cleanup; } ! t = add_init_expr_to_sym (sym->name, &init, &gfc_current_locus); ! return (t == SUCCESS) ? MATCH_YES : MATCH_ERROR; cleanup: gfc_free_expr (init); diff -Nrcpad gcc-4.4.1/gcc/fortran/gfortran.info gcc-4.4.2/gcc/fortran/gfortran.info *** gcc-4.4.1/gcc/fortran/gfortran.info Wed Jul 22 08:33:04 2009 --- gcc-4.4.2/gcc/fortran/gfortran.info Thu Oct 15 08:46:25 2009 *************** *** 1,5 **** This is doc/gfortran.info, produced by makeinfo version 4.13 from ! /d/gcc-4.4.1/gcc-4.4.1/gcc/fortran/gfortran.texi. Copyright (C) 1999-2008 Free Software Foundation, Inc. --- 1,5 ---- This is doc/gfortran.info, produced by makeinfo version 4.13 from ! /d/gcc-4.4.2/gcc-4.4.2/gcc/fortran/gfortran.texi. Copyright (C) 1999-2008 Free Software Foundation, Inc. diff -Nrcpad gcc-4.4.1/gcc/fortran/intrinsic.c gcc-4.4.2/gcc/fortran/intrinsic.c *** gcc-4.4.1/gcc/fortran/intrinsic.c Fri Jan 9 23:47:55 2009 --- gcc-4.4.2/gcc/fortran/intrinsic.c Fri Sep 11 22:11:06 2009 *************** gfc_is_intrinsic (gfc_symbol* sym, int s *** 836,848 **** /* See if this intrinsic is allowed in the current standard. */ if (gfc_check_intrinsic_standard (isym, &symstd, false, loc) == FAILURE) { ! if (gfc_option.warn_intrinsics_std) ! gfc_warning_now ("The intrinsic '%s' at %L is not included in the" ! " selected standard but %s and '%s' will be treated as" ! " if declared EXTERNAL. Use an appropriate -std=*" ! " option or define -fall-intrinsics to allow this" ! " intrinsic.", sym->name, &loc, symstd, sym->name); ! sym->attr.external = 1; return false; } --- 836,852 ---- /* See if this intrinsic is allowed in the current standard. */ if (gfc_check_intrinsic_standard (isym, &symstd, false, loc) == FAILURE) { ! if (sym->attr.proc == PROC_UNKNOWN) ! { ! if (gfc_option.warn_intrinsics_std) ! gfc_warning_now ("The intrinsic '%s' at %L is not included in the" ! " selected standard but %s and '%s' will be" ! " treated as if declared EXTERNAL. Use an" ! " appropriate -std=* option or define" ! " -fall-intrinsics to allow this intrinsic.", ! sym->name, &loc, symstd, sym->name); ! gfc_add_external (&sym->attr, &loc); ! } return false; } diff -Nrcpad gcc-4.4.1/gcc/fortran/iresolve.c gcc-4.4.2/gcc/fortran/iresolve.c *** gcc-4.4.1/gcc/fortran/iresolve.c Sat Nov 1 13:26:19 2008 --- gcc-4.4.2/gcc/fortran/iresolve.c Sun Aug 16 20:04:40 2009 *************** gfc_resolve_transfer (gfc_expr *f, gfc_e *** 2346,2354 **** /* TODO: Make this do something meaningful. */ static char transfer0[] = "__transfer0", transfer1[] = "__transfer1"; ! if (mold->ts.type == BT_CHARACTER && !mold->ts.cl->length ! && !(mold->expr_type == EXPR_VARIABLE && mold->symtree->n.sym->attr.dummy)) ! mold->ts.cl->length = gfc_int_expr (mold->value.character.length); f->ts = mold->ts; --- 2346,2364 ---- /* TODO: Make this do something meaningful. */ static char transfer0[] = "__transfer0", transfer1[] = "__transfer1"; ! if (mold->ts.type == BT_CHARACTER ! && !mold->ts.cl->length ! && gfc_is_constant_expr (mold)) ! { ! int len; ! if (mold->expr_type == EXPR_CONSTANT) ! mold->ts.cl->length = gfc_int_expr (mold->value.character.length); ! else ! { ! len = mold->value.constructor->expr->value.character.length; ! mold->ts.cl->length = gfc_int_expr (len); ! } ! } f->ts = mold->ts; diff -Nrcpad gcc-4.4.1/gcc/fortran/openmp.c gcc-4.4.2/gcc/fortran/openmp.c *** gcc-4.4.1/gcc/fortran/openmp.c Sat Jul 19 16:22:12 2008 --- gcc-4.4.2/gcc/fortran/openmp.c Tue Jul 28 16:33:08 2009 *************** gfc_match_omp_clauses (gfc_omp_clauses * *** 396,407 **** const char *p = gfc_extract_int (cexpr, &collapse); if (p) { ! gfc_error (p); collapse = 1; } else if (collapse <= 0) { ! gfc_error ("COLLAPSE clause argument not constant positive integer at %C"); collapse = 1; } c->collapse = collapse; --- 396,408 ---- const char *p = gfc_extract_int (cexpr, &collapse); if (p) { ! gfc_error_now (p); collapse = 1; } else if (collapse <= 0) { ! gfc_error_now ("COLLAPSE clause argument not" ! " constant positive integer at %C"); collapse = 1; } c->collapse = collapse; diff -Nrcpad gcc-4.4.1/gcc/fortran/primary.c gcc-4.4.2/gcc/fortran/primary.c *** gcc-4.4.1/gcc/fortran/primary.c Fri Apr 3 20:56:54 2009 --- gcc-4.4.2/gcc/fortran/primary.c Sat Sep 5 14:25:39 2009 *************** gfc_match_varspec (gfc_expr *primary, in *** 1773,1779 **** if (m != MATCH_YES) return MATCH_ERROR; ! tbp = gfc_find_typebound_proc (sym, &t, name, false); if (tbp) { gfc_symbol* tbp_sym; --- 1773,1783 ---- if (m != MATCH_YES) return MATCH_ERROR; ! if (sym->f2k_derived) ! tbp = gfc_find_typebound_proc (sym, &t, name, false); ! else ! tbp = NULL; ! if (tbp) { gfc_symbol* tbp_sym; diff -Nrcpad gcc-4.4.1/gcc/fortran/resolve.c gcc-4.4.2/gcc/fortran/resolve.c *** gcc-4.4.1/gcc/fortran/resolve.c Sat Jun 20 09:21:06 2009 --- gcc-4.4.2/gcc/fortran/resolve.c Wed Jul 29 09:35:15 2009 *************** resolve_symbol (gfc_symbol *sym) *** 9414,9420 **** if ((!a->save && !a->dummy && !a->pointer && !a->in_common && !a->use_assoc && !(a->function && sym != sym->result)) ! || (a->dummy && a->intent == INTENT_OUT)) apply_default_init (sym); } --- 9414,9420 ---- if ((!a->save && !a->dummy && !a->pointer && !a->in_common && !a->use_assoc && !(a->function && sym != sym->result)) ! || (a->dummy && a->intent == INTENT_OUT && !a->pointer)) apply_default_init (sym); } diff -Nrcpad gcc-4.4.1/gcc/fortran/trans-decl.c gcc-4.4.2/gcc/fortran/trans-decl.c *** gcc-4.4.1/gcc/fortran/trans-decl.c Wed Jun 3 19:39:09 2009 --- gcc-4.4.2/gcc/fortran/trans-decl.c Mon Oct 5 09:19:13 2009 *************** init_intent_out_dt (gfc_symbol * proc_sy *** 2826,2834 **** gfc_init_block (&fnblock); for (f = proc_sym->formal; f; f = f->next) if (f->sym && f->sym->attr.intent == INTENT_OUT ! && f->sym->ts.type == BT_DERIVED) { ! if (f->sym->ts.derived->attr.alloc_comp) { tmp = gfc_deallocate_alloc_comp (f->sym->ts.derived, f->sym->backend_decl, --- 2826,2835 ---- gfc_init_block (&fnblock); for (f = proc_sym->formal; f; f = f->next) if (f->sym && f->sym->attr.intent == INTENT_OUT ! && !f->sym->attr.pointer ! && f->sym->ts.type == BT_DERIVED) { ! if (f->sym->ts.derived->attr.alloc_comp && !f->sym->value) { tmp = gfc_deallocate_alloc_comp (f->sym->ts.derived, f->sym->backend_decl, *************** init_intent_out_dt (gfc_symbol * proc_sy *** 2840,2848 **** gfc_add_expr_to_block (&fnblock, tmp); } ! ! if (!f->sym->ts.derived->attr.alloc_comp ! && f->sym->value) body = gfc_init_default_dt (f->sym, body); } --- 2841,2847 ---- gfc_add_expr_to_block (&fnblock, tmp); } ! else if (f->sym->value) body = gfc_init_default_dt (f->sym, body); } *************** gfc_trans_use_stmts (gfc_namespace * ns) *** 3253,3259 **** st = gfc_find_symtree (ns->sym_root, rent->local_name[0] ? rent->local_name : rent->use_name); ! gcc_assert (st && st->n.sym->attr.use_assoc); if (st->n.sym->backend_decl && DECL_P (st->n.sym->backend_decl) && st->n.sym->module --- 3252,3264 ---- st = gfc_find_symtree (ns->sym_root, rent->local_name[0] ? rent->local_name : rent->use_name); ! gcc_assert (st); ! ! /* Fixing-up doubly contained symbols, sometimes results in ! ambiguity, which is caught here. */ ! if (!st->n.sym->attr.use_assoc) ! continue; ! if (st->n.sym->backend_decl && DECL_P (st->n.sym->backend_decl) && st->n.sym->module *************** generate_local_decl (gfc_symbol * sym) *** 3573,3578 **** --- 3578,3584 ---- automatic lengths. */ if (sym->attr.dummy && !sym->attr.referenced && sym->ts.type == BT_DERIVED + && !sym->attr.pointer && sym->ts.derived->attr.alloc_comp && sym->attr.intent == INTENT_OUT) { diff -Nrcpad gcc-4.4.1/libgfortran/ChangeLog gcc-4.4.2/libgfortran/ChangeLog *** gcc-4.4.1/libgfortran/ChangeLog Wed Jul 22 07:31:09 2009 --- gcc-4.4.2/libgfortran/ChangeLog Thu Oct 15 07:40:49 2009 *************** *** 1,3 **** --- 1,35 ---- + 2009-10-15 Release Manager + + * GCC 4.4.2 released. + + 2009-09-19 Jerry DeLisle + + Backport from mainline: + PR libgfortran/41328 + * io/transfer.c (read_sf): Adjust fbuf position and do proper fbuf reads + to traverse CR, CR-LF, and LF style line ends.Set at_eof flag on short + read if any characters were successfully read so that EOF condition with + no EOR marker succeeds. + + 2009-08-24 Steven G. Kargl + + PR fortran/41157 + * dtime.c (dtime_sub): Fix computing time increment. + * time_1.h: Add header. Use RUSAGE_SELF macro instead + of a hardcoded 0. + + 2009-08-20 Thomas Koenig + + PR libfortran/40962 + * iso_c_binding.c (c_f_pointer_u0): Multiply stride by + previous stride. + + 2009-08-04 Jerry DeLisle + + PR libfortran/40853 + * io/list_read.c (nml_get_obj_data): Do not set nl + pointer to first_nl if nl->next is NULL. + 2009-07-22 Release Manager * GCC 4.4.1 released. diff -Nrcpad gcc-4.4.1/libgfortran/intrinsics/dtime.c gcc-4.4.2/libgfortran/intrinsics/dtime.c *** gcc-4.4.1/libgfortran/intrinsics/dtime.c Thu Apr 9 23:23:07 2009 --- gcc-4.4.2/libgfortran/intrinsics/dtime.c Tue Aug 25 03:30:25 2009 *************** iexport_proto(dtime_sub); *** 38,46 **** void dtime_sub (gfc_array_r4 *t, GFC_REAL_4 *result) { - static GFC_REAL_4 tu = 0.0, ts = 0.0, tt = 0.0; GFC_REAL_4 *tp; long user_sec, user_usec, system_sec, system_usec; if (((t->dim[0].ubound + 1 - t->dim[0].lbound)) < 2) runtime_error ("Insufficient number of elements in TARRAY."); --- 38,47 ---- void dtime_sub (gfc_array_r4 *t, GFC_REAL_4 *result) { GFC_REAL_4 *tp; long user_sec, user_usec, system_sec, system_usec; + static long us = 0, uu = 0, ss = 0 , su = 0; + GFC_REAL_4 tu, ts, tt; if (((t->dim[0].ubound + 1 - t->dim[0].lbound)) < 2) runtime_error ("Insufficient number of elements in TARRAY."); *************** dtime_sub (gfc_array_r4 *t, GFC_REAL_4 * *** 48,62 **** __gthread_mutex_lock (&dtime_update_lock); if (__time_1 (&user_sec, &user_usec, &system_sec, &system_usec) == 0) { ! tu = (GFC_REAL_4)(user_sec + 1.e-6 * user_usec) - tu; ! ts = (GFC_REAL_4)(system_sec + 1.e-6 * system_usec) - ts; tt = tu + ts; } else { ! tu = (GFC_REAL_4)-1.0; ! ts = (GFC_REAL_4)-1.0; ! tt = (GFC_REAL_4)-1.0; } tp = t->data; --- 49,67 ---- __gthread_mutex_lock (&dtime_update_lock); if (__time_1 (&user_sec, &user_usec, &system_sec, &system_usec) == 0) { ! tu = (GFC_REAL_4) ((user_sec - us) + 1.e-6 * (user_usec - uu)); ! ts = (GFC_REAL_4) ((system_sec - ss) + 1.e-6 * (system_usec - su)); tt = tu + ts; + us = user_sec; + uu = user_usec; + ss = system_sec; + su = system_usec; } else { ! tu = -1; ! ts = -1; ! tt = -1; } tp = t->data; diff -Nrcpad gcc-4.4.1/libgfortran/intrinsics/iso_c_binding.c gcc-4.4.2/libgfortran/intrinsics/iso_c_binding.c *** gcc-4.4.1/libgfortran/intrinsics/iso_c_binding.c Thu Apr 9 23:23:07 2009 --- gcc-4.4.2/libgfortran/intrinsics/iso_c_binding.c Thu Aug 20 20:42:38 2009 *************** ISO_C_BINDING_PREFIX (c_f_pointer_u0) (v *** 137,144 **** f_ptr_out->offset = f_ptr_out->dim[0].lbound * f_ptr_out->dim[0].stride; for (i = 1; i < shapeSize; i++) { ! f_ptr_out->dim[i].stride = (f_ptr_out->dim[i-1].ubound + 1) ! - f_ptr_out->dim[i-1].lbound; f_ptr_out->offset += f_ptr_out->dim[i].lbound * f_ptr_out->dim[i].stride; } --- 137,144 ---- f_ptr_out->offset = f_ptr_out->dim[0].lbound * f_ptr_out->dim[0].stride; for (i = 1; i < shapeSize; i++) { ! f_ptr_out->dim[i].stride = ((f_ptr_out->dim[i-1].ubound + 1) ! - f_ptr_out->dim[i-1].lbound) * f_ptr_out->dim[i-1].stride; f_ptr_out->offset += f_ptr_out->dim[i].lbound * f_ptr_out->dim[i].stride; } diff -Nrcpad gcc-4.4.1/libgfortran/intrinsics/time_1.h gcc-4.4.2/libgfortran/intrinsics/time_1.h *** gcc-4.4.1/libgfortran/intrinsics/time_1.h Thu Apr 9 23:23:07 2009 --- gcc-4.4.2/libgfortran/intrinsics/time_1.h Tue Aug 25 03:30:25 2009 *************** see the files COPYING3 and COPYING.RUNTI *** 51,56 **** --- 51,60 ---- # endif #endif + #ifdef HAVE_SYS_TYPES_H + #include + #endif + /* The most accurate way to get the CPU time is getrusage (). */ #if defined (HAVE_GETRUSAGE) && defined (HAVE_SYS_RESOURCE_H) # include *************** __time_1 (long *user_sec, long *user_use *** 112,118 **** { #if defined (HAVE_GETRUSAGE) && defined (HAVE_SYS_RESOURCE_H) struct rusage usage; ! getrusage (0, &usage); *user_sec = usage.ru_utime.tv_sec; *user_usec = usage.ru_utime.tv_usec; --- 116,122 ---- { #if defined (HAVE_GETRUSAGE) && defined (HAVE_SYS_RESOURCE_H) struct rusage usage; ! getrusage (RUSAGE_SELF, &usage); *user_sec = usage.ru_utime.tv_sec; *user_usec = usage.ru_utime.tv_usec; diff -Nrcpad gcc-4.4.1/libgfortran/io/list_read.c gcc-4.4.2/libgfortran/io/list_read.c *** gcc-4.4.1/libgfortran/io/list_read.c Tue Jun 9 03:15:04 2009 --- gcc-4.4.2/libgfortran/io/list_read.c Wed Aug 5 03:15:18 2009 *************** get_name: *** 2772,2778 **** if (nl->type == GFC_DTYPE_DERIVED) nml_touch_nodes (nl); ! if (component_flag && nl->var_rank > 0) nl = first_nl; /* Make sure no extraneous qualifiers are there. */ --- 2772,2778 ---- if (nl->type == GFC_DTYPE_DERIVED) nml_touch_nodes (nl); ! if (component_flag && nl->var_rank > 0 && nl->next) nl = first_nl; /* Make sure no extraneous qualifiers are there. */ diff -Nrcpad gcc-4.4.1/libgfortran/io/transfer.c gcc-4.4.2/libgfortran/io/transfer.c *** gcc-4.4.1/libgfortran/io/transfer.c Sun Jul 19 23:10:22 2009 --- gcc-4.4.2/libgfortran/io/transfer.c Sat Sep 19 17:21:20 2009 *************** read_sf (st_parameter_dt *dtp, int * len *** 232,252 **** if (q == '\n' || q == '\r') { ! /* Unexpected end of line. */ /* If we see an EOR during non-advancing I/O, we need to skip the rest of the I/O statement. Set the corresponding flag. */ if (dtp->u.p.advance_status == ADVANCE_NO || dtp->u.p.seen_dollar) dtp->u.p.eor_condition = 1; ! /* If we encounter a CR, it might be a CRLF. */ if (q == '\r') /* Probably a CRLF */ { ! if (n < *length && *(p + 1) == '\n') ! dtp->u.p.sf_seen_eor = 2; } - else - dtp->u.p.sf_seen_eor = 1; /* Without padding, terminate the I/O statement without assigning the value. With padding, the value still needs to be assigned, --- 232,259 ---- if (q == '\n' || q == '\r') { ! /* Unexpected end of line. Set the position. */ ! fbuf_seek (dtp->u.p.current_unit, n + 1 ,SEEK_CUR); ! dtp->u.p.sf_seen_eor = 1; /* If we see an EOR during non-advancing I/O, we need to skip the rest of the I/O statement. Set the corresponding flag. */ if (dtp->u.p.advance_status == ADVANCE_NO || dtp->u.p.seen_dollar) dtp->u.p.eor_condition = 1; ! /* If we encounter a CR, it might be a CRLF. */ if (q == '\r') /* Probably a CRLF */ { ! /* See if there is an LF. Use fbuf_read rather then fbuf_getc so ! the position is not advanced unless it really is an LF. */ ! int readlen = 1; ! p = fbuf_read (dtp->u.p.current_unit, &readlen); ! if (*p == '\n' && readlen == 1) ! { ! dtp->u.p.sf_seen_eor = 2; ! fbuf_seek (dtp->u.p.current_unit, 1 ,SEEK_CUR); ! } } /* Without padding, terminate the I/O statement without assigning the value. With padding, the value still needs to be assigned, *************** read_sf (st_parameter_dt *dtp, int * len *** 260,266 **** } *length = n; ! break; } /* Short circuit the read if a comma is found during numeric input. The flag is set to zero during character reads so that commas in --- 267,273 ---- } *length = n; ! goto done; } /* Short circuit the read if a comma is found during numeric input. The flag is set to zero during character reads so that commas in *************** read_sf (st_parameter_dt *dtp, int * len *** 274,292 **** *length = n; break; } - n++; p++; } ! fbuf_seek (dtp->u.p.current_unit, n + dtp->u.p.sf_seen_eor + seen_comma, ! SEEK_CUR); /* A short read implies we hit EOF, unless we hit EOR, a comma, or some other stuff. Set the relevant flags. */ if (lorig > *length && !dtp->u.p.sf_seen_eor && !seen_comma) { ! if (no_error) dtp->u.p.at_eof = 1; else { --- 281,297 ---- *length = n; break; } n++; p++; } ! fbuf_seek (dtp->u.p.current_unit, n + seen_comma, SEEK_CUR); /* A short read implies we hit EOF, unless we hit EOR, a comma, or some other stuff. Set the relevant flags. */ if (lorig > *length && !dtp->u.p.sf_seen_eor && !seen_comma) { ! if (n > 0 || no_error) dtp->u.p.at_eof = 1; else {