The g++.dg/cpp26/literals2.C FAILs on Solaris like this:
FAIL: g++.dg/cpp26/literals2.C -std=gnu++11 (test for errors, line 10)
FAIL: g++.dg/cpp26/literals2.C -std=gnu++11 (test for errors, line 11)
FAIL: g++.dg/cpp26/literals2.C -std=gnu++11 (test for errors, line 13)
FAIL: g++.dg/cpp26/literals2.C -std=gnu++11 (test for errors, line 41)
FAIL: g++.dg/cpp26/literals2.C -std=gnu++11 (test for errors, line 42)
FAIL: g++.dg/cpp26/literals2.C -std=gnu++11 (test for errors, line 44)
As discussed in the PR, this is an issue with the Solaris iconv
implementation. While one could fix it by requiring GNU libiconv or
implement a workaround in libcpp, it seems easier to just skip the test
on Solaris. xfailing it isn't really an option since that would have to
be applied to every single affected dg-error which seems overkill.
Tested on i386-pc-solaris2.11 and x86_64-pc-linux-gnu.
Ok for trunk?
Rainer
--
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University
2024-03-13 Rainer Orth <[email protected]>
gcc/testsuite:
PR c++/112652
* g++.dg/cpp26/literals2.C: Skip on Solaris.
# HG changeset patch
# Parent 219aa4ee2b44a1b6dd1f0cda5d15420522d0cbf8
testsuite: c++: xfail g++.dg/cpp26/literals2.C on Solaris [PR112652]
diff --git a/gcc/testsuite/g++.dg/cpp26/literals2.C b/gcc/testsuite/g++.dg/cpp26/literals2.C
--- a/gcc/testsuite/g++.dg/cpp26/literals2.C
+++ b/gcc/testsuite/g++.dg/cpp26/literals2.C
@@ -3,6 +3,7 @@
// { dg-require-effective-target int32 }
// { dg-options "-pedantic-errors -finput-charset=UTF-8 -fexec-charset=ISO-8859-1" }
/* { dg-require-iconv "ISO-8859-1" } */
+/* { dg-skip-if "PR c++/112652" *-*-solaris2* } */
int a = 'abcd'; // { dg-warning "multi-character character constant" }
int b = '\x61\x62\x63\x64'; // { dg-warning "multi-character character constant" }