From: Gaius Mulley Date: Thu, 16 Mar 2023 20:41:20 +0000 (+0000) Subject: PR modula2/109125 SIGBUS in m2pim_ldtoa_ldtoa X-Git-Tag: basepoints/gcc-14~488 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f231bca93ca92f6fd55de6fbe4bf8935f9ec558a;p=thirdparty%2Fgcc.git PR modula2/109125 SIGBUS in m2pim_ldtoa_ldtoa 13 regression failures seen on sparc SIGBUS in m2pim_ldtoa_ldtoa. This patch fixes int bool struct field mismatches between the definition modules and their C/C++ implementations. gcc/testsuite/ChangeLog: PR modula2/109125 * gm2/types/run/pass/d.c: Convert data structure from BOOLEAN int to bool and cast int to bool in test function. Signed-off-by: Gaius Mulley --- diff --git a/gcc/testsuite/gm2/types/run/pass/d.c b/gcc/testsuite/gm2/types/run/pass/d.c index 17b91253547c..31d497d121e8 100644 --- a/gcc/testsuite/gm2/types/run/pass/d.c +++ b/gcc/testsuite/gm2/types/run/pass/d.c @@ -22,7 +22,7 @@ typedef struct { union { struct { int foo; - int bar; + bool bar; union { int bt; int bf; @@ -45,11 +45,10 @@ void d_test (this *s, int n, int v) case 1: assert(s->tag == v); break; case 2: assert(s->that.first.foo == v); break; - case 3: assert(s->that.first.bar == v); break; + case 3: assert(s->that.first.bar == (bool) v); break; case 4: assert(s->that.first.inner.bt == v); break; case 5: assert(s->that.first.inner.bf == v); break; case 6: assert(s->that.an == v); break; case 7: assert(s->final == v); break; } } -