]> 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)
committerAndrew Pinski <quic_apinski@quicinc.com>
Sun, 26 Nov 2023 03:00:42 +0000 (19:00 -0800)
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>
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