The gfortran frontend defines the two options -i8 and -r8 in gfortran/lang.opt. gcc/opts.sh appears to process lang.opt without a problem, because the produced options.h file contains OPT_i8 and OPT_r8. However, neither -i8 nor -r8 is passed to gfc_handle_option, which is defined to LANG_HOOKS_HANDLE_OPTION in f95-lang.c.
I have added some debugging printfs to gfc_handle_option int gfc_handle_option (size_t scode, const char *arg, int value) { int result = 1; enum opt_code code = (enum opt_code) scode; printf("code = %d ", code); if (arg != NULL) printf("arg = %s ", arg); printf("value = %d\n", value); The execution of gfortran shows that gfc_handle_option is never called if -i8 or -r8 is specified. troutmask:sgk[307] gfc41 -static -o kl -d8 kl.f90 code = 138 value = 1 troutmask:sgk[308] gfc41 -static -o kl -r8 kl.f90 gfc41: unrecognized option '-r8' troutmask:sgk[309] gfc41 -static -o kl -i8 kl.f90 Note, -d8 is OPT_d8 in options.h and it is passed to gfc_handle_option. So, it appears that some magic parsing of command line arguments occurs before gfc_handle_option is called. Is there someway to inhibit this magic?? -- Summary: Options aren't handled by LANG_HOOKS_HANDLE_OPTIONS Product: gcc Version: 4.0.0 Status: UNCONFIRMED Severity: normal Priority: P2 Component: other AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: sgk at troutmask dot apl dot washington dot edu CC: gcc-bugs at gcc dot gnu dot org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20390