Adriaan van Os wrote:
TEST fjf327.pas: ./fjf327.pas: In main program: ./fjf327.pas:9: error: constant out of range failed
*** compiler is right, testsuite is wrong (I recall the discussion on range checking for constants)
What does the discussion have to do with it? AFAICS, it's the same issue as before: The test program assumes that the negative of the maximum value of Cardinal is representable which is true if and only if Cardinal is smaller than LongestInt. So, yes, the test program is wrong, as before.
Yes, the test program is wrong, I just hinted at $R- for constants.
I see. But I don't think that's the proper solution. $R- turns off runtime errors on out-of-range conditions, but the test program isn't really meant to test the behaviour on out-of-range conditions, but whether values of unsigned types are correctly made signed on negation, so using CCardinal (as you did) is in the spirit of the test program.
Thanks for keeping the original programs as int64[a-e].pas. Though I wonder if we shouldn't merge them into a single program (easy to do for "OK" tests), to avoid giving 5 failures for the same reason (no 128 bit types). Or even turn failures into "SKIPPED" if there's no larger type than Integer (I could write a small script to do that).
Waldek, what's the status WRT 128 bit integer types? Is it realistic to support them in the foreseeable future (or with which backend version)?
Frank