Jeff Law <jeffreya...@gmail.com> writes:

> On 1/6/25 6:03 AM, Maciej W. Rozycki wrote:

...
>> There are notable regressions between a plain `-mno-bwx'
>> configuration
>> and a `-mno-bwx -msafe-partial' one:
>> FAIL: gm2/iso/run/pass/strcons.mod execution,  -g
>> FAIL: gm2/iso/run/pass/strcons.mod execution,  -O
>> FAIL: gm2/iso/run/pass/strcons.mod execution,  -O -g
>> FAIL: gm2/iso/run/pass/strcons.mod execution,  -Os
>> FAIL: gm2/iso/run/pass/strcons.mod execution,  -O3 -fomit-frame-pointer
>> FAIL: gm2/iso/run/pass/strcons.mod execution,  -O3 -fomit-frame-pointer 
>> -finline-functions
>> FAIL: gm2/iso/run/pass/strcons4.mod execution,  -g
>> FAIL: gm2/iso/run/pass/strcons4.mod execution,  -O
>> FAIL: gm2/iso/run/pass/strcons4.mod execution,  -O -g
>> FAIL: gm2/iso/run/pass/strcons4.mod execution,  -Os
>> FAIL: gm2/iso/run/pass/strcons4.mod execution,  -O3 -fomit-frame-pointer
>> FAIL: gm2/iso/run/pass/strcons4.mod execution,  -O3 -fomit-frame-pointer 
>> -finline-functions
...

>>   NB from my limited experience with Modula 2 decades ago I thought
>> the
>> language was strongly-typed, so an alignment mismatch I guess shouldn't
>> happen.  But perhaps I've been wrong; corrections are welcome.
> Sounds like we're roughly in a similar position.  My experience was
> decades ago and before I started working on compilers and started
> caring about such things.  So i can't provide any meaningful insight
> on this.

FWITW the tests strcons.mod and strcons4.mod are derived from the ISO M2
standard example on record constructors given on p.237.  Record
constructor constants were absent from the earlier PIM dialects of M2.

However I'm suspicious of the m2 front end as I think it could be fixed
by using __builtin_memcpy to assign record, array and set constructors.
I'll log a PR and fix it,

regards,
Gaius

Reply via email to