Thanks a lot Tom and Andrew for your reviews. Please find the updated patch as an attachment. Now fortran specific runto_main is renamed as fortran_runto_main, which is inline with the other such procedures as go_runto_main etc. gdb/testsuite/ChangeLog * lib/fortran.exp (fortran_main): New Proc, handle flang MAIN_, (fortran_runto_main): New Proc, fortran version of runto_main. * gdb.fortran/array-bounds-high.exp: Handle flang MAIN_. * gdb.fortran/array-bounds.exp: Likewise. * gdb.fortran/array-slices.exp: Likewise. * gdb.fortran/block-data.exp: Likewise. * gdb.fortran/charset.exp: Likewise. * gdb.fortran/common-block.exp: Likewise. * gdb.fortran/complex.exp: Likewise. * gdb.fortran/derived-type-function.exp: Likewise. * gdb.fortran/derived-type.exp: Likewise. * gdb.fortran/info-modules.exp: Likewise. * gdb.fortran/info-types.exp: Likewise. * gdb.fortran/intrinsics.exp: Likewise. * gdb.fortran/library-module.exp: Likewise. * gdb.fortran/logical.exp: Likewise. * gdb.fortran/max-depth.exp: Likewise. * gdb.fortran/module.exp: Likewise. * gdb.fortran/multi-dim.exp: Likewise. * gdb.fortran/nested-funcs.exp: Likewise. * gdb.fortran/print-formatted.exp: Likewise. * gdb.fortran/print_type.exp: Likewise. * gdb.fortran/printing-types.exp: Likewise. * gdb.fortran/ptr-indentation.exp: Likewise. * gdb.fortran/ptype-on-functions.exp: Likewise. * gdb.fortran/subarray.exp: Likewise. * gdb.fortran/vla-alloc-assoc.exp: Likewise. * gdb.fortran/vla-datatypes.exp: Likewise. * gdb.fortran/vla-history.exp: Likewise. * gdb.fortran/vla-ptr-info.exp: Likewise. * gdb.fortran/vla-ptype-sub.exp: Likewise. * gdb.fortran/vla-ptype.exp: Likewise. * gdb.fortran/vla-sizeof.exp: Likewise. * gdb.fortran/vla-type.exp: Likewise. * gdb.fortran/vla-value-sub-arbitrary.exp: Likewise. * gdb.fortran/vla-value-sub-finish.exp: Likewise. * gdb.fortran/vla-value-sub.exp: Likewise. * gdb.fortran/vla-value.exp: Likewise. * gdb.fortran/whatis_type.exp: Likewise. * gdb.mi/mi-var-child-f.exp: Likewise. Please let me know your comments. Regards, Alok -----Original Message----- From: Andrew Burgess Sent: Friday, April 24, 2020 7:08 PM To: Tom Tromey Cc: Sharma, Alok Kumar ; George, Jini Susan ; Achra, Nitika ; gdb-patches@sourceware.org Subject: Re: [PATCH] gdb/fortran: Allow Flang MAIN_ in Fortran testing [CAUTION: External Email] * Tom Tromey [2020-04-24 06:56:13 -0600]: > >>>>> "Andrew" == Andrew Burgess writes: > > Andrew> And my main thought is that what we should do is override > Andrew> runto_main in lib/fortran.exp, and then switch all of the test > Andrew> over to using that instead, this would be more consistent with > Andrew> how the C/C++ tests work then. > > Redefining procs is a bit dangerous because it can change the test > environment for subsequent tests, which may not be Fortran tests. I'm > not sure if that's what you were proposing but I figured I'd point it > out just in case. OK, that's a valid point. Maybe we should just make 'proc runto_main' smarter then? Add some logic to pick a suitable name for the main function per-language? Or maybe we should do 'proc fortran_runto_main' .... ? I'd just like something that's more inline with the existing 'runto_main' in style I think.. Thanks, Andrew