Eliminate copies of main.c in gdb.dwarf2.
Tested on x86_64-linux.
gdb/testsuite/ChangeLog:
2020-10-20  Tom de Vries  <tdevries@suse.de>
	* gdb.dwarf2/arr-stride.c: Remove.
	* gdb.dwarf2/arr-stride.exp: Use main.c.
	* gdb.dwarf2/arr-subrange.c: Remove.
	* gdb.dwarf2/arr-subrange.exp: Use main.c.
	* gdb.dwarf2/bad-regnum.c: Remove.
	* gdb.dwarf2/bad-regnum.exp: Use main.c.
	* gdb.dwarf2/corrupt.c: Remove.
	* gdb.dwarf2/corrupt.exp: Use main.c.
	* gdb.dwarf2/dw2-bad-elf.c: Remove.
	* gdb.dwarf2/dw2-bad-elf.exp: Use main.c.
	* gdb.dwarf2/dw2-icycle.c: Remove.
	* gdb.dwarf2/dw2-icycle.exp: Use main.c.
	* gdb.dwarf2/formdata16.c: Remove.
	* gdb.dwarf2/formdata16.exp: Use main.c.
	* gdb.dwarf2/implptrconst.c: Remove.
	* gdb.dwarf2/implptrconst.exp: Use main.c.
	* gdb.dwarf2/info-locals-optimized-out.c: Remove.
	* gdb.dwarf2/info-locals-optimized-out.exp: Use main.c.
	* gdb.dwarf2/opaque-type-lookup.c: Remove.
	* gdb.dwarf2/opaque-type-lookup.exp: Use main.c.
+2020-10-20  Tom de Vries  <tdevries@suse.de>
+
+       * gdb.dwarf2/arr-stride.c: Remove.
+       * gdb.dwarf2/arr-stride.exp: Use main.c.
+       * gdb.dwarf2/arr-subrange.c: Remove.
+       * gdb.dwarf2/arr-subrange.exp: Use main.c.
+       * gdb.dwarf2/bad-regnum.c: Remove.
+       * gdb.dwarf2/bad-regnum.exp: Use main.c.
+       * gdb.dwarf2/corrupt.c: Remove.
+       * gdb.dwarf2/corrupt.exp: Use main.c.
+       * gdb.dwarf2/dw2-bad-elf.c: Remove.
+       * gdb.dwarf2/dw2-bad-elf.exp: Use main.c.
+       * gdb.dwarf2/dw2-icycle.c: Remove.
+       * gdb.dwarf2/dw2-icycle.exp: Use main.c.
+       * gdb.dwarf2/formdata16.c: Remove.
+       * gdb.dwarf2/formdata16.exp: Use main.c.
+       * gdb.dwarf2/implptrconst.c: Remove.
+       * gdb.dwarf2/implptrconst.exp: Use main.c.
+       * gdb.dwarf2/info-locals-optimized-out.c: Remove.
+       * gdb.dwarf2/info-locals-optimized-out.exp: Use main.c.
+       * gdb.dwarf2/opaque-type-lookup.c: Remove.
+       * gdb.dwarf2/opaque-type-lookup.exp: Use main.c.
+
 2020-10-20  Tom de Vries  <tdevries@suse.de>
 
        * gdb.dwarf2/ada-valprint-error.exp: Remove redundant mention of .exp
 
+++ /dev/null
-/* Copyright 2014-2020 Free Software Foundation, Inc.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
-
-int
-main (void)
-{
-  return 0;
-}
 
     return 0
 }
 
-standard_testfile .c -dw.S
+standard_testfile main.c -dw.S
 
 # Make some DWARF for the test.
 set asm_file [standard_output_file $srcfile2]
 
+++ /dev/null
-/* Copyright 2014-2020 Free Software Foundation, Inc.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
-
-int
-main (void)
-{
-  asm ("main_label: .globl main_label");
-  return 0;
-}
 
     return 0
 }
 
-standard_testfile .c -dw.S
+standard_testfile main.c -dw.S
 
 # Make some DWARF for the test.
 set asm_file [standard_output_file $srcfile2]
 
+++ /dev/null
-/* Copyright 2015-2020 Free Software Foundation, Inc.
-
-   This file is part of GDB.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
-
-int
-main ()
-{
-  return 0;
-}
 
     return 0
 }
 
-standard_testfile .c -dw.S
+standard_testfile main.c -dw.S
 
 # Make some DWARF for the test.
 set asm_file [standard_output_file $srcfile2]
 
+++ /dev/null
-/* This testcase is part of GDB, the GNU debugger.
-
-   Copyright 2014-2020 Free Software Foundation, Inc.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
-
-/* Dummy main function.  */
-
-int
-main (void)
-{
-  return 0;
-}
 
     return 0
 }
 
-standard_testfile .c .S
+standard_testfile main.c .S
 
 # Make the DWARF used for the test.
 #
 
+++ /dev/null
-/* Copyright 2019-2020 Free Software Foundation, Inc.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
-
-int
-main ()
-{
-  asm ("main_label: .globl main_label");
-  return 0;
-}
 
     return 0
 }
 
-standard_testfile .c -other.S -dwarf.S
+standard_testfile main.c -other.S -dwarf.S
 
 # Make some DWARF for the test.
 set asm_file [standard_output_file $srcfile3]
 
+++ /dev/null
-/* This testcase is part of GDB, the GNU debugger.
-
-   Copyright 2004-2020 Free Software Foundation, Inc.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
-
-/* Dummy main function.  */
-
-int
-main()
-{
-  return 0;
-}
 
     return 0
 }
 
-standard_testfile .S .c
+standard_testfile .S main.c
 
 if { [prepare_for_testing "failed to prepare" ${testfile} \
          [list $srcfile $srcfile2] {nodebug}] } {
 
+++ /dev/null
-/* This testcase is part of GDB, the GNU debugger.
-
-   Copyright 2017-2020 Free Software Foundation, Inc.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
-
-int
-main ()
-{
-  return 0;
-}
 
     return 0  
 }
 
-standard_testfile .c -dw.S
+standard_testfile main.c -dw.S
 
 # We need to know the endianess in order
 # to write some of the debugging info we'd like to generate.
 
+++ /dev/null
-/* This testcase is part of GDB, the GNU debugger.
-
-   Copyright 2013-2020 Free Software Foundation, Inc.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
-
-int
-main ()
-{
-  return 0;
-}
 
 
 if { [skip_cplus_tests] } { continue }
 
-standard_testfile .c -dw.S
+standard_testfile main.c -dw.S
 
 # Make some DWARF for the test.
 set asm_file [standard_output_file $srcfile2]
 
+++ /dev/null
-/* This testcase is part of GDB, the GNU debugger.
-
-   Copyright 2017-2020 Free Software Foundation, Inc.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
-
-int
-main (void)
-{
-  asm ("main_label: .globl main_label");
-  return 0;
-}
 
     return 0
 }
 
-standard_testfile .c -dw.S
+standard_testfile main.c -dw.S
 
 # Make some DWARF for the test.
 
 
+++ /dev/null
-/* This testcase is part of GDB, the GNU debugger.
-
-   Copyright 2015-2020 Free Software Foundation, Inc.
-
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 3 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
-
-int
-main()
-{
-  asm ("main_label: .globl main_label");
-  return 0;
-}
 
     return 0
 }
 
-standard_testfile .c -1.S -2.c
+standard_testfile main.c -1.S -2.c
 
 # Create the DWARF.
 set asm_file [standard_output_file $srcfile2]