]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Fix contracts-tmpl-spec2.C on targets where plain char is unsigned by default
authorAndrew Pinski <quic_apinski@quicinc.com>
Fri, 24 Nov 2023 02:55:30 +0000 (18:55 -0800)
committerTorbjörn SVENSSON <torbjorn.svensson@foss.st.com>
Wed, 7 Feb 2024 17:33:54 +0000 (18:33 +0100)
Since contracts-tmpl-spec2.C is just testing contracts, I thought it would be better
to just add `-fsigned-char` to the options rather than change the testcase to support
both cases.

Committed after testing on aarch64-linux-gnu.

gcc/testsuite/ChangeLog:

PR testsuite/108321
* g++.dg/contracts/contracts-tmpl-spec2.C: Add -fsigned-char
to options.

Signed-off-by: Andrew Pinski <quic_apinski@quicinc.com>
(cherry picked from commit 6e15e4e1abed02443a27a69455f4bfa49457c99e)

gcc/testsuite/g++.dg/contracts/contracts-tmpl-spec2.C

index 82117671b2d37a7be39b8c940868729594cb316b..fd3a25bd051467a52d1bb1bdf4b18095864f0dfc 100644 (file)
@@ -1,6 +1,6 @@
 // basic test to ensure contracts work for class and member specializations
 // { dg-do run }
-// { dg-options "-std=c++2a -fcontracts -fcontract-continuation-mode=on" }
+// { dg-options "-std=c++2a -fcontracts -fcontract-continuation-mode=on -fsigned-char" }
 #include <cstdio>
 
 // template specializations can have differing contracts