diff -rcp2N g77-0.5.10/README.g77 g77-0.5.11/README.g77 *** g77-0.5.10/README.g77 Wed Feb 22 16:21:36 1995 --- g77-0.5.11/README.g77 Thu Feb 23 04:39:36 1995 *************** *** 1,5 **** ! 950222 ! This directory contains the version 0.5.10 release of the GNU Fortran compiler. The GNU Fortran compiler is free software. See the file COPYING.g77 for copying permission. --- 1,5 ---- ! 950223 ! This directory contains the version 0.5.11 release of the GNU Fortran compiler. The GNU Fortran compiler is free software. See the file COPYING.g77 for copying permission. *************** If you have just unpacked the g77 distri *** 21,25 **** you must merge the contents of the g77 distribution with the appropriate gcc distribution on your system before proceeding. Using sample ! versions of 2.6.3 for gcc and 0.5.10 for g77, the process of unpacking and merging both distributions would be done as follows (where # is the shell prompt): --- 21,25 ---- you must merge the contents of the g77 distribution with the appropriate gcc distribution on your system before proceeding. Using sample ! versions of 2.6.3 for gcc and 0.5.11 for g77, the process of unpacking and merging both distributions would be done as follows (where # is the shell prompt): *************** shell prompt): *** 26,32 **** # tar xf gcc-2.6.3.tar # Creates ./gcc-2.6.3/ ! # tar xf g77-0.5.10.tar # Creates ./g77-0.5.10/ ! * # mv g77-0.5.10/* gcc-2.6.3/ # Merges gcc and g77 into ./gcc-2.6.3/ ! # rmdir g77-0.5.10 # Remove empty ./g77-0.5.10/ Another approach is to do the following: --- 26,32 ---- # tar xf gcc-2.6.3.tar # Creates ./gcc-2.6.3/ ! # tar xf g77-0.5.11.tar # Creates ./g77-0.5.11/ ! * # mv g77-0.5.11/* gcc-2.6.3/ # Merges gcc and g77 into ./gcc-2.6.3/ ! # rmdir g77-0.5.11 # Remove empty ./g77-0.5.11/ Another approach is to do the following: *************** Another approach is to do the following: *** 33,38 **** # tar xf gcc-2.6.3.tar # Creates ./gcc-2.6.3/ ! # ln -s gcc-2.6.3 g77-0.5.10 # Make g77-0.5.10 a link to gcc-2.6.3 ! # tar xf g77-0.5.10.tar # Unpacks g77 into gcc-2.6.3 The latter approach leaves the symbolic link, which might help others --- 33,38 ---- # tar xf gcc-2.6.3.tar # Creates ./gcc-2.6.3/ ! # ln -s gcc-2.6.3 g77-0.5.11 # Make g77-0.5.11 a link to gcc-2.6.3 ! # tar xf g77-0.5.11.tar # Unpacks g77 into gcc-2.6.3 The latter approach leaves the symbolic link, which might help others *************** problem occurs using one of the above me *** 46,50 **** The resulting directory layout is as follows, where gcc/ might be, ! for example, gcc-0.5.10/: gcc/ Non-Fortran files in gcc (not part of g77*.tar) --- 46,50 ---- The resulting directory layout is as follows, where gcc/ might be, ! for example, gcc-0.5.11/: gcc/ Non-Fortran files in gcc (not part of g77*.tar) diff -rcp2N g77-0.5.10/f/ChangeLog g77-0.5.11/f/ChangeLog *** g77-0.5.10/f/ChangeLog Wed Feb 22 16:20:08 1995 --- g77-0.5.11/f/ChangeLog Thu Feb 23 04:38:39 1995 *************** *** 1,2 **** --- 1,37 ---- + Thu Feb 23 02:48:38 1995 Craig Burley (burley@gnu.ai.mit.edu) + + * DOC: Explain -fugly-args. + + * bad.def (FFEBAD_ACTUALARG): Explain -fugly-args and how to + rewrite code to not require it. + + * com.c (ffecom_vardesc_): Handle negative type code, just in + case. + (ffecom_arg_ptr_to_expr): Let ffecom_expr handle hollerith + and typeless constants (move code to ffecom_constantunion). + (ffecom_constantunion): Handle hollerith and typeless constants. + + * expr.c (ffecom_finished_): Check -fugly-args in actual-arg + context where hollerith/typeless provided. + + * intrin.def (FFEINTRIN_genDFLOAT): Add FFEINTRIN_specDFLOAT. + (FFEINTRIN_specDFLOAT): Add as f2c intrinsic. + + * target.h (ffetarget_convert_real[12]_integer, + ffetarget_convert_complex[12]_integer): Pass -1 for high integer + value if low part is negative. + (FFETARGET_defaultIS_UGLY_ARGS): New macro. + + * top.c (ffe_is_ugly_args_): New variable. + (ffe_decode_option): Handle -fugly-args and -fno-ugly-args. + + * top.h (ffe_is_ugly_args_, ffe_is_ugly_args(), + ffe_set_is_ugly_args()): New variable and macros. + + Thu Feb 23 02:48:38 1995 Pedro A M Vazquez (vazquez@iqm.unicamp.br) + + * g77.c (sys_errlist): Use const for __FreeBSD__ systems + as well. + Wed Feb 22 13:33:43 1995 Craig Burley (burley@gnu.ai.mit.edu) diff -rcp2N g77-0.5.10/f/DOC g77-0.5.11/f/DOC *** g77-0.5.10/f/DOC Tue Feb 21 13:50:58 1995 --- g77-0.5.11/f/DOC Thu Feb 23 04:38:39 1995 *************** *** 1,3 **** ! 950221 *IMPORTANT GENERAL INFORMATION* --- 1,3 ---- ! 950223 *IMPORTANT GENERAL INFORMATION* *************** a hassle, requiring manual intervention. *** 53,56 **** --- 53,77 ---- *CHANGES DURING 0.5.x* + In 0.5.11: + + - The -fugly-args command-line option has been introduced. It enables + a subset of the constructs enabled by -fugly -- specifically, the + ability to specify a Hollerith or Typeless constant directly as + an actual argument. The default, -fnougly-args, produces a diagnostic + message that, as of 0.5.11, has been revised to suggest ways to + avoid the message, either by using -fugly-args or -fugly, or by + changing the Fortran source code as follows: + + Replace CALL FOO(4HABCD) with CALL FOO(%VAL('ABCD')) + Replace CALL FOO('FF00'X) with CALL FOO(%VAL(65280)) + + Currently, typeless constants as actual arguments are converted to INTEGER. + This might change if it is discovered that industry practices conform + to some other conversion process for typeless constants. Hollerith + constants are converted to a string of bytes as specified by the + length of the constants, so CALL FOO(13Hhello there!!) really passes + a 13-byte argument by value, just as gcc would if given `foo(x);' + where x is declared as `struct { char a[13]; } x = "hello there!!";'. + In 0.5.9: *************** The constructs enabled via -fugly includ *** 552,555 **** --- 573,583 ---- - DO loops with REAL or DOUBLE PRECISION DO variables (including implied-DO loops in I/O and DATA statements). + + As of 0.5.11, the -fugly-args and -fno-ugly-args options are available. + The construct enabled via -fugly-args is a subset of those enabled via + -fugly, and is: + + - Passing of typeless and hollerith constants as actual arguments + in procedure invocations *CASE SENSITIVITY IN SOURCE CODE* diff -rcp2N g77-0.5.10/f/bad.def g77-0.5.11/f/bad.def *** g77-0.5.10/f/bad.def Wed Feb 15 16:58:42 1995 --- g77-0.5.11/f/bad.def Thu Feb 23 04:38:40 1995 *************** FFEBAD_MSGS (FFEBAD_DO_REAL, WARN, "DO-v *** 383,387 **** FFEBAD_MSGS (FFEBAD_NAMELIST_CASE, WARN, "NAMELIST not adequately supported by run-time library for source files with case preserved", "NAMELIST unsupported by library for case-preserved sources") FFEBAD_MSGS (FFEBAD_NESTED_PERCENT, WARN, "Nested %% construct (%%VAL, %%REF, or %%DESCR) ignored at %0", "Nested %% ignored at %0") ! FFEBAD_MSGS (FFEBAD_ACTUALARG, WARN, "Invalid actual argument at %0 -- hollerith and typeless constants not permitted in this context", "Invalid actual argument at %0") #if 0 FFEBAD_MSGS (FFEBAD_MISSING_ADJARRAY_UNSUPPORTED, FATAL, "Omission of dummy adjustable array %A (first mentioned at %0) in any entry point temporarily unsupported -- calling that entry point would probably crash at run time", "Unsupported omission of dummy array %A (e.g. possibly at %0)") --- 383,387 ---- FFEBAD_MSGS (FFEBAD_NAMELIST_CASE, WARN, "NAMELIST not adequately supported by run-time library for source files with case preserved", "NAMELIST unsupported by library for case-preserved sources") FFEBAD_MSGS (FFEBAD_NESTED_PERCENT, WARN, "Nested %% construct (%%VAL, %%REF, or %%DESCR) ignored at %0", "Nested %% ignored at %0") ! FFEBAD_MSGS (FFEBAD_ACTUALARG, WARN, "Invalid actual argument at %0 -- replace hollerith constants with %%VAL('string') and typeless constants with %%VAL(constant), or use -fugly-args or -fugly", "Invalid actual argument at %0") #if 0 FFEBAD_MSGS (FFEBAD_MISSING_ADJARRAY_UNSUPPORTED, FATAL, "Omission of dummy adjustable array %A (first mentioned at %0) in any entry point temporarily unsupported -- calling that entry point would probably crash at run time", "Unsupported omission of dummy array %A (e.g. possibly at %0)") diff -rcp2N g77-0.5.10/f/com.c g77-0.5.11/f/com.c *** g77-0.5.10/f/com.c Wed Feb 22 16:20:10 1995 --- g77-0.5.11/f/com.c Thu Feb 23 04:38:44 1995 *************** ffecom_vardesc_ (ffebld expr) *** 7463,7467 **** assert (tc != -1); ! typeinit = build_int_2 (tc, 0); } else --- 7463,7467 ---- assert (tc != -1); ! typeinit = build_int_2 (tc, (tc < 0) ? -1 : 0); } else *************** ffecom_arg_ptr_to_expr (ffebld expr, tre *** 8080,8115 **** case FFEBLD_opCONTER: ! if (ffeinfo_basictype (ffebld_info (expr)) ! == FFEINFO_basictypeHOLLERITH) ! { ! ffetargetHollerith h; ! ! h = ffebld_constant_hollerith (ffebld_conter (expr)); ! ! item = build_string (h.length, h.text); ! TREE_TYPE (item) ! = build_type_variant (build_array_type (char_type_node, ! build_range_type ! (integer_type_node, ! integer_one_node, ! build_int_2 ! (h.length, 0))), ! 1, 0); ! return item; ! } ! if (ffeinfo_basictype (ffebld_info (expr)) ! == FFEINFO_basictypeTYPELESS) ! { /* Handled like %VAL(INT(expr)). */ ! ffetargetInteger1 ival; ! ffetargetTypeless tless; ! ffebad error; ! ! tless = ffebld_constant_typeless (ffebld_conter (expr)); ! error = ffetarget_convert_integer1_typeless (&ival, tless); ! assert (error == FFEBAD); ! ! item = build_int_2 ((int) ival, 0); ! return item; ! } break; --- 8080,8090 ---- case FFEBLD_opCONTER: ! /* Hollerith and typeless constants as actual args get passed ! by value. */ ! if ((ffeinfo_basictype (ffebld_info (expr)) ! == FFEINFO_basictypeHOLLERITH) ! || (ffeinfo_basictype (ffebld_info (expr)) ! == FFEINFO_basictypeTYPELESS)) ! return ffecom_expr (expr); break; *************** ffecom_constantunion (ffebldConstantUnio *** 8481,8484 **** --- 8456,8491 ---- (val), 0))), 1, 0); + } + break; + + case FFEINFO_basictypeHOLLERITH: + { + ffetargetHollerith h; + + h = ffebld_cu_val_hollerith (*cu); + + item = build_string (h.length, h.text); + TREE_TYPE (item) + = build_type_variant (build_array_type (char_type_node, + build_range_type + (integer_type_node, + integer_one_node, + build_int_2 + (h.length, 0))), + 1, 0); + } + break; + + case FFEINFO_basictypeTYPELESS: + { + ffetargetInteger1 ival; + ffetargetTypeless tless; + ffebad error; + + tless = ffebld_cu_val_typeless (*cu); + error = ffetarget_convert_integer1_typeless (&ival, tless); + assert (error == FFEBAD); + + item = build_int_2 ((int) ival, 0); } break; diff -rcp2N g77-0.5.10/f/expr.c g77-0.5.11/f/expr.c *** g77-0.5.10/f/expr.c Wed Feb 15 16:58:41 1995 --- g77-0.5.11/f/expr.c Thu Feb 23 04:38:46 1995 *************** again: /* :::::::::::::::::::: */ *** 11120,11123 **** --- 11120,11124 ---- case FFEINFO_basictypeTYPELESS: if (!ffe_is_ugly () + && !ffe_is_ugly_args () && ffebad_start (FFEBAD_ACTUALARG)) { diff -rcp2N g77-0.5.10/f/g77.c g77-0.5.11/f/g77.c *** g77-0.5.10/f/g77.c Wed Feb 15 16:54:12 1995 --- g77-0.5.11/f/g77.c Thu Feb 23 04:38:46 1995 *************** the Free Software Foundation, 675 Mass A *** 95,99 **** extern int errno, sys_nerr; ! #if defined(bsd4_4) || defined(__NetBSD__) extern const char *const sys_errlist[]; #else --- 95,99 ---- extern int errno, sys_nerr; ! #if defined(bsd4_4) || defined(__NetBSD__) || defined(__FreeBSD__) extern const char *const sys_errlist[]; #else diff -rcp2N g77-0.5.10/f/intrin.def g77-0.5.11/f/intrin.def *** g77-0.5.10/f/intrin.def Wed Feb 15 16:58:40 1995 --- g77-0.5.11/f/intrin.def Thu Feb 23 04:38:47 1995 *************** DEFGEN (FFEINTRIN_genDCMPLX, "DCMPLX", / *** 1093,1096 **** --- 1093,1097 ---- ) DEFGEN (FFEINTRIN_genDFLOAT, "DFLOAT", /* F2C, VXT */ + FFEINTRIN_specDFLOAT, FFEINTRIN_specDFLOTI, FFEINTRIN_specDFLOTJ, *************** DEFGEN (FFEINTRIN_genDFLOAT, "DFLOAT", / *** 1105,1109 **** FFEINTRIN_specNONE, FFEINTRIN_specNONE, - FFEINTRIN_specNONE, FFEINTRIN_specNONE ) --- 1106,1109 ---- *************** DEFSPEC (FFEINTRIN_specDCOSD, *** 3412,3415 **** --- 3412,3421 ---- FFEINTRIN_familyVXT, FFEINTRIN_impNONE + ) + DEFSPEC (FFEINTRIN_specDFLOAT, + "DFLOAT", + FALSE, + FFEINTRIN_familyF2C, + FFEINTRIN_imp_DBLE_I ) DEFSPEC (FFEINTRIN_specDFLOTI, diff -rcp2N g77-0.5.10/f/target.h g77-0.5.11/f/target.h *** g77-0.5.10/f/target.h Thu Feb 16 21:42:52 1995 --- g77-0.5.11/f/target.h Thu Feb 23 04:38:47 1995 *************** the Free Software Foundation, 675 Mass A *** 79,82 **** --- 79,85 ---- #define FFETARGET_defaultIS_UGLY 0 #endif + #ifndef FFETARGET_defaultIS_UGLY_ARGS + #define FFETARGET_defaultIS_UGLY_ARGS 0 + #endif #ifndef FFETARGET_defaultIS_VXT_NOT_90 #define FFETARGET_defaultIS_VXT_NOT_90 0 *************** void *ffetarget_memcpy_ (void *dst, void *** 886,890 **** #define ffetarget_convert_complex1_integer(res,l) \ ({ REAL_VALUE_TYPE resi, resr; \ ! REAL_VALUE_FROM_INT (resr, (long) (l), (long) 0); \ resi = dconst0; \ REAL_VALUE_TO_TARGET_SINGLE (resr, (res)->real); \ --- 889,894 ---- #define ffetarget_convert_complex1_integer(res,l) \ ({ REAL_VALUE_TYPE resi, resr; \ ! ffetargetInteger1 lf = (l); \ ! REAL_VALUE_FROM_INT (resr, (long) lf, (long) ((lf < 0) ? -1 : 0)); \ resi = dconst0; \ REAL_VALUE_TO_TARGET_SINGLE (resr, (res)->real); \ *************** void *ffetarget_memcpy_ (void *dst, void *** 931,939 **** #ifdef REAL_ARITHMETIC #define ffetarget_convert_complex2_integer(res,l) \ ! ({REAL_VALUE_TYPE resi, resr; \ ! REAL_VALUE_FROM_INT (resr, (long) (l), (long) 0); \ ! resi = dconst0; \ ! REAL_VALUE_TO_TARGET_DOUBLE (resr, (long *) &((res)->real.v[0])); \ ! REAL_VALUE_TO_TARGET_DOUBLE (resi, (long *) &((res)->imaginary.v[0])); \ FFEBAD; }) #else --- 935,944 ---- #ifdef REAL_ARITHMETIC #define ffetarget_convert_complex2_integer(res,l) \ ! ({ REAL_VALUE_TYPE resi, resr; \ ! ffetargetInteger1 lf = (l); \ ! REAL_VALUE_FROM_INT (resr, (long) lf, (long) ((lf < 0) ? -1 : 0)); \ ! resi = dconst0; \ ! REAL_VALUE_TO_TARGET_DOUBLE (resr, (long *) &((res)->real.v[0])); \ ! REAL_VALUE_TO_TARGET_DOUBLE (resi, (long *) &((res)->imaginary.v[0])); \ FFEBAD; }) #else *************** void *ffetarget_memcpy_ (void *dst, void *** 1036,1040 **** #define ffetarget_convert_real1_integer1(res,l) \ ({ REAL_VALUE_TYPE resr; \ ! REAL_VALUE_FROM_INT (resr, (long) (l), (long) 0); \ REAL_VALUE_TO_TARGET_SINGLE (resr, *(res)); \ FFEBAD; }) --- 1041,1046 ---- #define ffetarget_convert_real1_integer1(res,l) \ ({ REAL_VALUE_TYPE resr; \ ! ffetargetInteger1 lf = (l); \ ! REAL_VALUE_FROM_INT (resr, (long) lf, (long) ((lf < 0) ? -1 : 0)); \ REAL_VALUE_TO_TARGET_SINGLE (resr, *(res)); \ FFEBAD; }) *************** void *ffetarget_memcpy_ (void *dst, void *** 1061,1065 **** #define ffetarget_convert_real2_integer(res,l) \ ({ REAL_VALUE_TYPE resr; \ ! REAL_VALUE_FROM_INT (resr, (long) (l), (long) 0); \ REAL_VALUE_TO_TARGET_DOUBLE (resr, (long *) &((res)->v[0])); \ FFEBAD; }) --- 1067,1072 ---- #define ffetarget_convert_real2_integer(res,l) \ ({ REAL_VALUE_TYPE resr; \ ! ffetargetInteger1 lf = (l); \ ! REAL_VALUE_FROM_INT (resr, (long) lf, (long) ((lf < 0) ? -1 : 0)); \ REAL_VALUE_TO_TARGET_DOUBLE (resr, (long *) &((res)->v[0])); \ FFEBAD; }) diff -rcp2N g77-0.5.10/f/top.c g77-0.5.11/f/top.c *** g77-0.5.10/f/top.c Wed Feb 15 16:58:36 1995 --- g77-0.5.11/f/top.c Thu Feb 23 04:38:47 1995 *************** bool ffe_is_pedantic_ = FFETARGET_defaul *** 69,72 **** --- 69,73 ---- bool ffe_is_saveall_; /* TRUE if mainprog or SAVE (no args) seen. */ bool ffe_is_ugly_ = FFETARGET_defaultIS_UGLY; + bool ffe_is_ugly_args_ = FFETARGET_defaultIS_UGLY_ARGS; bool ffe_is_version_ = FALSE; bool ffe_is_vxt_not_90_ = FFETARGET_defaultIS_VXT_NOT_90; *************** ffe_decode_option (char *opt) *** 164,167 **** --- 165,172 ---- else if (strcmp (&opt[2], "no-ugly") == 0) ffe_set_is_ugly (FALSE); + else if (strcmp (&opt[2], "ugly-args") == 0) + ffe_set_is_ugly_args (TRUE); + else if (strcmp (&opt[2], "no-ugly-args") == 0) + ffe_set_is_ugly_args (FALSE); else if (strcmp (&opt[2], "debug") == 0) ffe_set_is_ffedebug (TRUE); diff -rcp2N g77-0.5.10/f/top.h g77-0.5.11/f/top.h *** g77-0.5.10/f/top.h Thu Feb 16 21:42:52 1995 --- g77-0.5.11/f/top.h Thu Feb 23 04:38:47 1995 *************** extern bool ffe_is_pedantic_; *** 89,92 **** --- 89,93 ---- extern bool ffe_is_saveall_; extern bool ffe_is_ugly_; + extern bool ffe_is_ugly_args_; extern bool ffe_is_version_; extern bool ffe_is_vxt_not_90_; *************** void ffe_terminate_4 (void); *** 154,157 **** --- 155,159 ---- #define ffe_is_vxt_not_90() ffe_is_vxt_not_90_ #define ffe_is_ugly() ffe_is_ugly_ + #define ffe_is_ugly_args() ffe_is_ugly_args_ #define ffe_pool_file() (ffe_file_pool_) #define ffe_pool_any_unit() (ffe_any_unit_pool_) *************** void ffe_terminate_4 (void); *** 179,182 **** --- 181,185 ---- #define ffe_set_is_vxt_not_90(f) (ffe_is_vxt_not_90_ = (f)) #define ffe_set_is_ugly(f) (ffe_is_ugly_ = (f)) + #define ffe_set_is_ugly_args(f) (ffe_is_ugly_args_ = (f)) #define ffe_state_max(s1,s2) ((s1) > (s2) ? (s1) : (s2)) diff -rcp2N g77-0.5.10/f/zzz.c g77-0.5.11/f/zzz.c *** g77-0.5.10/f/zzz.c Wed Feb 22 16:20:10 1995 --- g77-0.5.11/f/zzz.c Thu Feb 23 04:38:48 1995 *************** the Free Software Foundation, 675 Mass A *** 36,40 **** /* Externals defined here. */ ! char *ffezzz_version_string = "0.5.10"; char *ffezzz_date = __DATE__; char *ffezzz_time = __TIME__; --- 36,40 ---- /* Externals defined here. */ ! char *ffezzz_version_string = "0.5.11"; char *ffezzz_date = __DATE__; char *ffezzz_time = __TIME__;