From: Tobias Burnus Date: Thu, 17 May 2007 08:39:32 +0000 (+0200) Subject: re PR fortran/31917 ([4.1 only] GFORTRAN_CONVERT_UNIT is ignored) X-Git-Tag: releases/gcc-4.3.0~5061 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=2d24f24b97c347da705188b5f96dfcacd76b2d4c;p=thirdparty%2Fgcc.git re PR fortran/31917 ([4.1 only] GFORTRAN_CONVERT_UNIT is ignored) 2007-05-14 Tobias Burnus PR fortran/31917 * runtime/environ.c (mark_range): Fix setting default convert unit. From-SVN: r124787 --- diff --git a/libgfortran/ChangeLog b/libgfortran/ChangeLog index 531787f32896..6d3e78e360f1 100644 --- a/libgfortran/ChangeLog +++ b/libgfortran/ChangeLog @@ -1,3 +1,8 @@ +2007-05-17 Tobias Burnus + + PR fortran/31917 + * runtime/environ.c (mark_range): Fix setting default convert unit. + 2007-05-15 Jerry DeLisle PR libfortran/31922 diff --git a/libgfortran/runtime/environ.c b/libgfortran/runtime/environ.c index c9c1e27f3a27..388383c9a816 100644 --- a/libgfortran/runtime/environ.c +++ b/libgfortran/runtime/environ.c @@ -868,14 +868,13 @@ mark_range (int unit1, int unit2) static int do_parse (void) { - int tok, def; + int tok; int unit1; int continue_ulist; char *start; unit_count = 0; - def = 0; start = p; /* Parse the string. First, let's look for a default. */ @@ -930,6 +929,7 @@ do_parse (void) break; case END: + def = endian; goto end; break; @@ -946,6 +946,18 @@ do_parse (void) tok = next_token (); switch (tok) { + case NATIVE: + if (next_token () != ':') + goto error; + endian = CONVERT_NATIVE; + break; + + case SWAP: + if (next_token () != ':') + goto error; + endian = CONVERT_SWAP; + break; + case LITTLE: if (next_token () != ':') goto error;