[PATCH] gdb/fortran: Allow Flang MAIN_ in Fortran testing
Sharma, Alok Kumar
AlokKumar.Sharma@amd.com
Fri Apr 24 10:26:40 GMT 2020
Hi all,
(Resending as previous mail was sent with wrong tag)
I request you all to please review this patch. Below are the details.
Problem Description:
Name of fortran main function for Flang compiler is MAIN_ while for gfortran it is MAIN__ . In test cases MAIN__ is hardcoded for the purpose of inserting breakpoint.
(please note the number of underscores after MAIN)
Resolution:
New proc is added to detect main function name depending on the compiler used. Which is used in testcases.
This commit adds support for Flang main function, there should be no change for gfortran.
gdb/testsuite/ChangeLog
* gdb.dwarf2/dw2-common-block.exp: Skip test except for gfortran,
as assembly file to be tested is generated by gfortran.
* lib/fortran.exp (fortran_main): New Proc, handle flang 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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-gdb-fortran-Allow-Flang-MAIN_-in-Fortran-testing.patch
Type: application/octet-stream
Size: 30204 bytes
Desc: 0001-gdb-fortran-Allow-Flang-MAIN_-in-Fortran-testing.patch
URL: <https://sourceware.org/pipermail/gdb-patches/attachments/20200424/bd17b19e/attachment-0001.obj>
More information about the Gdb-patches
mailing list