[c++] [testsuite] adjust contracts9.C for negative addresses
commitce2dfc57b4562fef0d279697d96f672bc903e853
authorAlexandre Oliva <oliva@adacore.com>
Thu, 18 Apr 2024 11:01:35 +0000 (18 08:01 -0300)
committerAlexandre Oliva <oliva@gnu.org>
Thu, 18 Apr 2024 11:11:51 +0000 (18 08:11 -0300)
treefc68e7bc7d2f203438bb68583e6b3feded893198
parentdf92df0c19f7783519a392f7ac7d4e617250c328
[c++] [testsuite] adjust contracts9.C for negative addresses

The test expected the address of a literal string, converted to long
long, to yield a positive value.  That expectation doesn't necessarily
hold, and the test fails where it doesn't.

Adjust the test to use a pointer that will compare as expected.

for  gcc/testsuite/ChangeLog

* g++.dg/contracts/contracts9.C: Don't assume string literals
have non-negative addresses.
gcc/testsuite/g++.dg/contracts/contracts9.C