]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
testsuite: gdc: Require ucn in gdc.test/runnable/mangle.d etc. [PR104739]
authorRainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
Wed, 14 Feb 2024 13:52:54 +0000 (14:52 +0100)
committerRainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
Wed, 14 Feb 2024 13:52:54 +0000 (14:52 +0100)
gdc.test/runnable/mangle.d and two other tests come out UNRESOLVED on
Solaris with the native assembler:

UNRESOLVED: gdc.test/runnable/mangle.d   compilation failed to produce executable
UNRESOLVED: gdc.test/runnable/mangle.d -shared-libphobos compilation failed
to produce executable
UNRESOLVED: gdc.test/runnable/testmodule.d compilation failed to produce
executable
UNRESOLVED: gdc.test/runnable/testmodule.d -shared-libphobos compilation
failed to produce executable
UNRESOLVED: gdc.test/runnable/ufcs.d   compilation failed to produce executable
UNRESOLVED: gdc.test/runnable/ufcs.d -shared-libphobos compilation failed
to produce executable

Assembler: mangle.d
        "/var/tmp//cci9q2Sc.s", line 115 : Syntax error
        Near line: "    movzbl  test_эльфийские_письмена_9, %eax"
        "/var/tmp//cci9q2Sc.s", line 115 : Syntax error
        Near line: "    movzbl  test_эльфийские_письмена_9, %eax"
        "/var/tmp//cci9q2Sc.s", line 115 : Syntax error
        Near line: "    movzbl  test_эльфийские_письмена_9, %eax"
        "/var/tmp//cci9q2Sc.s", line 115 : Syntax error
        Near line: "    movzbl  test_эльфийские_письмена_9, %eax"
        "/var/tmp//cci9q2Sc.s", line 115 : Syntax error
[...]

since /bin/as lacks UCN support.

Iain recently added UNICODE_NAMES: annotations to the affected tests and
those recently were imported into trunk.

This patch handles the DejaGnu side of things, adding

{ dg-require-effective-target ucn }

to those tests on the fly.

Tested on i386-pc-solaris2.11, sparc-sun-solaris2.11 (as and gas each),
and x86_64-pc-linux-gnu.

2024-02-03  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>

gcc/testsuite:
PR d/104739
* lib/gdc-utils.exp (gdc-convert-test) <UNICODE_NAMES>: Require
ucn support.

gcc/testsuite/lib/gdc-utils.exp

index 8c7efff7408308e16a1bd73d8634a8e99d75e21f..6600ef866d0a069fa20dd3f71ba51a69424458c2 100644 (file)
@@ -244,6 +244,7 @@ proc gdc-copy-file { srcdir filename } {
 #   POST_SCRIPT:       Not handled.
 #   REQUIRED_ARGS:     Arguments to add to the compiler command line.
 #   DISABLED:          Not handled.
+#   UNICODE_NAMES:     Requires ucn support.
 #
 
 proc gdc-convert-test { base test } {
@@ -365,6 +366,10 @@ proc gdc-convert-test { base test } {
            # COMPILABLE_MATH_TEST annotates tests that import the std.math
            # module.  Which will need skipping if not available on the target.
            set needs_phobos 1
+       } elseif [regexp -- {UNICODE_NAMES} $copy_line] {
+           # Require ucn support.
+           puts $fdout "// { dg-require-effective-target ucn }"
+
        }
     }