Go to file
Rainer Orth f1eeabc1fd testsuite: Fix various scan-assembler-symbol-section issues
This patch addresses some of the issues that I found when looking into the
failures of the scan-assembler-symbol-section tests on Solaris/SPARC.

* The first issue was that on Solaris/SPARC, section names are
  double-quoted, both with as and gas:

        .section        ".text"

  When using as, the section flag and type syntax is completely
  different from other ELF targets:

        .section        "my_named_section",#alloc,#execinstr,#progbits

  This patch fixes this by stripping double quotes from section names.

* However, this didn't work initially (only the leading quote was
  stripped), which is due to David's recent AIX patch: with the
  introduction of the new capturing group to handle both .section (ELF)
  and .csect (XCOFF), $full_section_directive would never be empty on
  ELF and Mach-O targets, so the extraction of the section name didn't
  work any longer.  This had also broken the Darwin tests completely.

* With working double quote stripping, all but one of the tests PASSed
  on Solaris/SPARC, the exception being:

FAIL: gcc.dg/20021029-1.c scan-assembler-symbol-section symbol ar (found __sparc_get_pc_thunk.l7) has section ^\\\\.(const|rodata)|\\\\[RO\\\\] (found .text.__sparc_get_pc_thunk.l7%__sparc_get_pc_thunk.l7)

  This is due to the symbol name (ar) not being anchored in the test and
  unexpectedly matchting __sparc_get_pc_thunk.l7.

* Next, I ran the tests on Darwin 11 and found two failing tests:

FAIL: gcc.dg/darwin-sections.c scan-assembler-symbol-section symbol ^_a\$ (symbol not found) has section \\\\.data
FAIL: gcc.dg/darwin-sections.c scan-assembler-symbol-section symbol ^_b\$ (symbol not found) has section \\\\.data

  is due to Iain's recent "Darwin : Begin rework of zero-fill sections."
  patch which emits

        .globl _a
        .zerofill __DATA,__common,_a,1,0

  This is already scanned for, so the two scans above can just go.

  The other failing test is

FAIL: g++.dg/gomp/tls-5.C  -std=c++14  scan-assembler-symbol-section symbol ^_?_ZGR2ir_\$ (symbol not found) has section ^\\\\.tdata|\\\\[TL\\\\]
FAIL: g++.dg/gomp/tls-5.C  -std=c++14  scan-assembler-symbol-section symbol ^_?ir\$ (symbol not found) has section ^\\\\.tbss|\\\\[TL\\\\]

  Other scans are guarded by target tls_native, and indeed the assembler
  output has

___emutls_v._ZGR2ir_:
___emutls_t._ZGR2ir_:

___emutls_v.ir:

  Unfortunately scan-assembler-symbol-section doesn't support selects
  yet, which this test implements both for the benefit of this test and
  for symmetry.

With those changes, test results are clean now on sparc-sun-solaris2.11,
i386-pc-solaris2.11, i386-apple-darwin11.4.2, and
powerpc-ibm-aix7.2.4.0.

2020-12-03  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>

	gcc:
	* doc/sourcebuild.texi (Commands for use in dg-final, Scan the
	assembly output, scan-assembler-symbol-section): Document.
	(scan-symbol-section): Document.

	gcc/testsuite:
	* lib/scanasm.exp (scan-symbol-section): Pass args to
	dg-scan-symbol-section.
	(scan-assembler-symbol-section): Likewise.
	(dg-scan-symbol-section): Handle selector from orig_args.
	Get patterns from orig_args.
	(parse_section_of_symbols): Fix section_pattern.
	Strip double quotes from section name.

	* g++.dg/gomp/tls-5.C: Restrict ir, _ZGR2ir_ scans to tls_native.
	* gcc.dg/20021029-1.c: Anchor ar symbol.
	* gcc.dg/darwin-sections.c: Remove obsolete scans for _a, _b in
	.data.
2020-12-13 12:48:26 +01:00
INSTALL
config Daily bump. 2020-11-26 00:16:41 +00:00
contrib Daily bump. 2020-12-09 00:16:50 +00:00
fixincludes Daily bump. 2020-11-19 00:16:30 +00:00
gcc testsuite: Fix various scan-assembler-symbol-section issues 2020-12-13 12:48:26 +01:00
gnattools
gotools Daily bump. 2020-10-30 00:16:29 +00:00
include Daily bump. 2020-12-10 00:16:47 +00:00
intl intl: Unbreak intl build with bison 3 when no regeneration is needed [PR92008] 2020-04-16 11:55:00 +02:00
libada Add `--with-toolexeclibdir=' configuration option 2020-01-24 11:24:25 +00:00
libatomic Daily bump. 2020-12-06 00:16:44 +00:00
libbacktrace Daily bump. 2020-12-06 00:16:44 +00:00
libcc1 Daily bump. 2020-12-06 00:16:44 +00:00
libcpp Daily bump. 2020-12-11 18:22:52 +00:00
libdecnumber Daily bump. 2020-07-31 00:16:26 +00:00
libffi Daily bump. 2020-12-06 00:16:44 +00:00
libgcc Daily bump. 2020-12-09 00:16:50 +00:00
libgfortran Daily bump. 2020-12-06 00:16:44 +00:00
libgo libgo: update to 1.15.6 release 2020-12-08 14:01:04 -08:00
libgomp Daily bump. 2020-12-10 00:16:47 +00:00
libhsail-rt Daily bump. 2020-12-06 00:16:44 +00:00
libiberty Daily bump. 2020-11-26 00:16:41 +00:00
libitm Daily bump. 2020-12-06 00:16:44 +00:00
libobjc Daily bump. 2020-12-06 00:16:44 +00:00
liboffloadmic Daily bump. 2020-11-30 00:16:27 +00:00
libphobos Daily bump. 2020-12-06 00:16:44 +00:00
libquadmath Daily bump. 2020-12-06 00:16:44 +00:00
libsanitizer Daily bump. 2020-12-06 00:16:44 +00:00
libssp Daily bump. 2020-12-06 00:16:44 +00:00
libstdc++-v3 Daily bump. 2020-12-13 00:16:19 +00:00
libvtv Daily bump. 2020-12-06 00:16:44 +00:00
lto-plugin Daily bump. 2020-11-30 00:16:27 +00:00
maintainer-scripts Daily bump. 2020-05-30 00:16:27 +00:00
zlib Daily bump. 2020-12-06 00:16:44 +00:00
.dir-locals.el
.gitattributes Add *.md diff=md. 2020-01-15 14:29:53 +01:00
.gitignore Sync .gitignore with binutils-gdb 2020-12-02 11:04:01 -07:00
ABOUT-NLS
COPYING
COPYING.LIB
COPYING.RUNTIME
COPYING3
COPYING3.LIB
ChangeLog Daily bump. 2020-12-06 00:16:44 +00:00
ChangeLog.jit
ChangeLog.tree-ssa
MAINTAINERS MAINTAINERS: Add myself as arc port maintainer 2020-12-02 16:09:21 +02:00
Makefile.def Merge top-level configury changes from gdb 2020-04-09 06:52:55 -06:00
Makefile.in Merge top-level configury changes from gdb 2020-04-09 06:52:55 -06:00
Makefile.tpl
README
ar-lib
compile
config-ml.in config-ml.in: Suppress output from multi-do recipes 2020-11-09 14:28:37 +00:00
config.guess config.sub, config.guess : Import upstream 2020-11-07. 2020-11-23 19:30:01 +00:00
config.rpath
config.sub config.sub, config.guess : Import upstream 2020-11-07. 2020-11-23 19:30:01 +00:00
configure configure: Support building D front-end on *-*-darwin* 2020-11-29 22:09:42 +01:00
configure.ac configure: Support building D front-end on *-*-darwin* 2020-11-29 22:09:42 +01:00
depcomp
install-sh
libtool-ldflags
libtool.m4 Darwin : Update libtool and dependencies for Darwin20 [PR97865] 2020-12-05 08:43:20 +00:00
ltgcc.m4
ltmain.sh Do not use HAVE_DOS_BASED_FILE_SYSTEM for Cygwin. 2020-04-17 09:22:51 +02:00
ltoptions.m4
ltsugar.m4
ltversion.m4
lt~obsolete.m4
missing
mkdep
mkinstalldirs
move-if-change
multilib.am
symlink-tree
test-driver
ylwrap

README

This directory contains the GNU Compiler Collection (GCC).

The GNU Compiler Collection is free software.  See the files whose
names start with COPYING for copying permission.  The manuals, and
some of the runtime libraries, are under different terms; see the
individual source files for details.

The directory INSTALL contains copies of the installation information
as HTML and plain text.  The source of this information is
gcc/doc/install.texi.  The installation information includes details
of what is included in the GCC sources and what files GCC installs.

See the file gcc/doc/gcc.texi (together with other files that it
includes) for usage and porting information.  An online readable
version of the manual is in the files gcc/doc/gcc.info*.

See http://gcc.gnu.org/bugs/ for how to report bugs usefully.

Copyright years on GCC source files may be listed using range
notation, e.g., 1987-2012, indicating that every year in the range,
inclusive, is a copyrightable year that could otherwise be listed
individually.