public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug modula2/107631] New: many tests don't link on Mac OS X 10.7
@ 2022-11-11 9:41 ro at gcc dot gnu.org
2022-11-11 10:53 ` [Bug modula2/107631] " gaius at gcc dot gnu.org
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: ro at gcc dot gnu.org @ 2022-11-11 9:41 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107631
Bug ID: 107631
Summary: many tests don't link on Mac OS X 10.7
Product: gcc
Version: 13.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: modula2
Assignee: gaius at gcc dot gnu.org
Reporter: ro at gcc dot gnu.org
CC: iains at gcc dot gnu.org
Target Milestone: ---
Host: x86_64-apple-darwin11.4.2
Target: x86_64-apple-darwin11.4.2
Build: x86_64-apple-darwin11.4.2
After I got gm2 and libgm2 to build on Mac OS X 10.7, test results aren't too
bad:
=== gm2 Summary for unix ===
# of expected passes 11604
# of unexpected failures 108
# of unresolved testcases 66
=== gm2 Summary for unix/-m32 ===
# of expected passes 10380
# of unexpected failures 708
# of unresolved testcases 690
=== gm2 Summary ===
# of expected passes 21984
# of unexpected failures 816
# of unresolved testcases 756
Fortunately, the causes for failure are limited:
* 64-bit:
/vol/gcc/src/hg/master/modula-2/gcc/testsuite/gm2/iso/pass/realbitscast.mod: In
function '_M2_realbitscast_init':
/vol/gcc/src/hg/master/modula-2/gcc/testsuite/gm2/iso/pass/realbitscast.mod:66:11:
error: cannot convert expression, only base types can be converted
compiler exited with status 1
FAIL: gm2/iso/pass/realbitscast.mod, -g
Undefined symbols for architecture x86_64:
"_scalbf", referenced from:
_Builtins_scalbf in libm2pim.a(Builtins.o)
(maybe you meant: _Builtins_scalbf)
"_scalbl", referenced from:
_Builtins_scalbl in libm2pim.a(Builtins.o)
(maybe you meant: _Builtins_scalbl, _Builtins_scalblnf , _Builtins_scalbln
, _Builtins_scalblnl )
"_significandf", referenced from:
_Builtins_significandf in libm2pim.a(Builtins.o)
(maybe you meant: _Builtins_significandf)
"_significandl", referenced from:
_Builtins_significandl in libm2pim.a(Builtins.o)
(maybe you meant: _Builtins_significandl)
ld: symbol(s) not found for architecture x86_64
collect2: error: ld returned 1 exit status
compiler exited with status 1
FAIL: gm2/iso/run/pass/long.mod compilation, -g
unsuccessful link
UNRESOLVED: gm2/iso/run/pass/long.mod execution, -g (link failed)
and many more instances, always those four. Source is
gcc/m2/gm2-libs/Builtins.{def,mod}.
* 32-bit:
/var/folders/zz/zyxvpxvq6csfxvn_n000087r00021y/T//ccxlVpeL.s:553:non-relocatable
subtraction expression, "__M2_termios_ctor" minus "L7$pb"
/var/folders/zz/zyxvpxvq6csfxvn_n000087r00021y/T//ccxlVpeL.s:553:symbol:
"__M2_termios_ctor" can't be undefined in a subtraction expression
/var/folders/zz/zyxvpxvq6csfxvn_n000087r00021y/T//ccxlVpeL.s:545:non-relocatable
subtraction expression, "__M2_errno_ctor" minus "L7$pb"
/var/folders/zz/zyxvpxvq6csfxvn_n000087r00021y/T//ccxlVpeL.s:545:symbol:
"__M2_errno_ctor" can't be undefined in a subtraction expression
/var/folders/zz/zyxvpxvq6csfxvn_n000087r00021y/T//ccxlVpeL.s:492:non-relocatable
subtraction expression, "__M2_RTco_ctor" minus "L7$pb"
/var/folders/zz/zyxvpxvq6csfxvn_n000087r00021y/T//ccxlVpeL.s:492:symbol:
"__M2_RTco_ctor" can't be undefined in a subtraction expression
/var/folders/zz/zyxvpxvq6csfxvn_n000087r00021y/T//ccxlVpeL.s:466:non-relocatable
subtraction expression, "__M2_SysExceptions_ctor" minus "L7$pb"
/var/folders/zz/zyxvpxvq6csfxvn_n000087r00021y/T//ccxlVpeL.s:466:symbol:
"__M2_SysExceptions_ctor" can't be undefined in a subtraction expression
compiler exited with status 1
FAIL: gm2/complex/run/pass/arith3.mod compilation, -g
unsuccessful link
UNRESOLVED: gm2/complex/run/pass/arith3.mod execution, -g (link failed)
and many more. Affects
12 "__M2_cgetopt_ctor"
24 "__M2_cpp_ctor"
528 "__M2_dtoa_ctor"
1284 "__M2_errno_ctor"
180 "__M2_ErrnoCategory_ctor"
12 "__M2_KeyBoardLEDs_ctor"
528 "__M2_ldtoa_ctor"
612 "__M2_RTco_ctor"
216 "__M2_Selective_ctor"
1284 "__M2_SysExceptions_ctor"
1284 "__M2_termios_ctor"
12 "__M2_UnixArgs_ctor"
144 "__M2_wrapc_ctor"
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug modula2/107631] many tests don't link on Mac OS X 10.7
2022-11-11 9:41 [Bug modula2/107631] New: many tests don't link on Mac OS X 10.7 ro at gcc dot gnu.org
@ 2022-11-11 10:53 ` gaius at gcc dot gnu.org
2022-12-20 0:15 ` iains at gcc dot gnu.org
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: gaius at gcc dot gnu.org @ 2022-11-11 10:53 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107631
--- Comment #1 from Gaius Mulley <gaius at gcc dot gnu.org> ---
an observation: all the affected modules listed are hand built C++ modules to
mimic modula-2.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug modula2/107631] many tests don't link on Mac OS X 10.7
2022-11-11 9:41 [Bug modula2/107631] New: many tests don't link on Mac OS X 10.7 ro at gcc dot gnu.org
2022-11-11 10:53 ` [Bug modula2/107631] " gaius at gcc dot gnu.org
@ 2022-12-20 0:15 ` iains at gcc dot gnu.org
2022-12-20 0:18 ` iains at gcc dot gnu.org
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: iains at gcc dot gnu.org @ 2022-12-20 0:15 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107631
Iain Sandoe <iains at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Last reconfirmed| |2022-12-20
Ever confirmed|0 |1
Status|UNCONFIRMED |NEW
--- Comment #2 from Iain Sandoe <iains at gcc dot gnu.org> ---
as discussed on irc, these functions do no exist on Darwin (and the
significand* set will likely be missing on several other targets).
Posix has obsoleted scalb* which should be replaced with scalbn*
===
I hacked the implementation thus:
(with this, on x86_64 darwin, we have 11k passes and 33 fails)
[PATCH] gm2: hack the builtins for scalb and significand
---
gcc/m2/gm2-libs/Builtins.mod | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/gcc/m2/gm2-libs/Builtins.mod b/gcc/m2/gm2-libs/Builtins.mod
index c679259dc3c..f4d4ded06b1 100644
--- a/gcc/m2/gm2-libs/Builtins.mod
+++ b/gcc/m2/gm2-libs/Builtins.mod
@@ -222,21 +222,23 @@ BEGIN
RETURN cbuiltin.ilogbl (x)
END ilogbl ;
+
PROCEDURE __ATTRIBUTE__ __BUILTIN__ ((__builtin_significand)) significand (r:
REAL) : REAL ;
BEGIN
- RETURN cbuiltin.significand (r)
+ RETURN cbuiltin.scalbn (r, -cbuiltin.ilogb (r))
END significand ;
PROCEDURE __ATTRIBUTE__ __BUILTIN__ ((__builtin_significandf)) significandf
(s: SHORTREAL) : SHORTREAL ;
BEGIN
- RETURN cbuiltin.significandf (s)
+ RETURN cbuiltin.scalbnf (s, -cbuiltin.ilogbf (s))
END significandf ;
PROCEDURE __ATTRIBUTE__ __BUILTIN__ ((__builtin_significandl)) significandl
(l: LONGREAL) : LONGREAL ;
BEGIN
- RETURN cbuiltin.significandl (l)
+ RETURN cbuiltin.scalbnl (l, -cbuiltin.ilogbl (l))
END significandl ;
+
PROCEDURE __ATTRIBUTE__ __BUILTIN__ ((__builtin_modf)) modf (x: REAL; VAR y:
REAL) : REAL ;
BEGIN
RETURN cbuiltin.modf (x, y)
@@ -299,17 +301,17 @@ END nexttowardl ;
PROCEDURE __ATTRIBUTE__ __BUILTIN__ ((__builtin_scalb)) scalb (x, n: REAL) :
REAL ;
BEGIN
- RETURN cbuiltin.scalb (x, n)
+ RETURN cbuiltin.scalbn (x, VAL (INTEGER, n))
END scalb ;
PROCEDURE __ATTRIBUTE__ __BUILTIN__ ((__builtin_scalbf)) scalbf (x, n:
SHORTREAL) : SHORTREAL ;
BEGIN
- RETURN cbuiltin.scalbf (x, n)
+ RETURN cbuiltin.scalbnf (x, VAL (INTEGER, n))
END scalbf ;
PROCEDURE __ATTRIBUTE__ __BUILTIN__ ((__builtin_scalbl)) scalbl (x, n:
LONGREAL) : LONGREAL ;
BEGIN
- RETURN cbuiltin.scalbl (x, n)
+ RETURN cbuiltin.scalbnl (x, VAL (INTEGER, n))
END scalbl ;
PROCEDURE __ATTRIBUTE__ __BUILTIN__ ((__builtin_scalbln)) scalbln (x: REAL;
n: LONGINT) : REAL ;
--
2.37.1 (Apple Git-137.1)
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug modula2/107631] many tests don't link on Mac OS X 10.7
2022-11-11 9:41 [Bug modula2/107631] New: many tests don't link on Mac OS X 10.7 ro at gcc dot gnu.org
2022-11-11 10:53 ` [Bug modula2/107631] " gaius at gcc dot gnu.org
2022-12-20 0:15 ` iains at gcc dot gnu.org
@ 2022-12-20 0:18 ` iains at gcc dot gnu.org
2023-01-05 16:55 ` cvs-commit at gcc dot gnu.org
2023-01-05 17:01 ` iains at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: iains at gcc dot gnu.org @ 2022-12-20 0:18 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107631
--- Comment #3 from Iain Sandoe <iains at gcc dot gnu.org> ---
FAOD, I am not expecting that the patch is the correct one - it is a
proof-of-principle as to where the issue lies.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug modula2/107631] many tests don't link on Mac OS X 10.7
2022-11-11 9:41 [Bug modula2/107631] New: many tests don't link on Mac OS X 10.7 ro at gcc dot gnu.org
` (2 preceding siblings ...)
2022-12-20 0:18 ` iains at gcc dot gnu.org
@ 2023-01-05 16:55 ` cvs-commit at gcc dot gnu.org
2023-01-05 17:01 ` iains at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-01-05 16:55 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107631
--- Comment #4 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Iain D Sandoe <iains@gcc.gnu.org>:
https://gcc.gnu.org/g:4413365616e8c6024d1ff4e23309e5012ee33b9f
commit r13-5035-g4413365616e8c6024d1ff4e23309e5012ee33b9f
Author: Iain Sandoe <iain@sandoe.co.uk>
Date: Wed Jan 4 21:03:24 2023 +0000
modula-2: Remove uses of scalb*() and significand*() [PR107631]
The scalb*() functions are obsolete in Posix from 2004 and removed in
2008.
The significand*() functions are glibc-only and considered there to be
obsolescent (not supported for types such as _Float128).
We can remove them from Modula-2 since they are not required for ISO
support, but we need to provide an implementation of significand* for
the "fraction()" functions.
PR modula2/107631
gcc/m2/ChangeLog:
* gm2-gcc/m2builtins.cc: Remove scalb, scalbf, scalbl,
significand, significandf, significandl.
* gm2-libs/Builtins.def (significand): Likewise.
* gm2-libs/Builtins.mod: Likewise.
* target-independent/Builtins.texi: Likewise.
* gm2-libs-iso/LowLong.mod: Implement fraction with scalbn*() and
ilogb*().
* gm2-libs-iso/LowReal.mod: Likewise.
* gm2-libs-iso/LowShort.mod: Likewise.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug modula2/107631] many tests don't link on Mac OS X 10.7
2022-11-11 9:41 [Bug modula2/107631] New: many tests don't link on Mac OS X 10.7 ro at gcc dot gnu.org
` (3 preceding siblings ...)
2023-01-05 16:55 ` cvs-commit at gcc dot gnu.org
@ 2023-01-05 17:01 ` iains at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: iains at gcc dot gnu.org @ 2023-01-05 17:01 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107631
Iain Sandoe <iains at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
Status|NEW |RESOLVED
--- Comment #5 from Iain Sandoe <iains at gcc dot gnu.org> ---
now that we have resolved the visibility of the module registration CTORs and
eliminated uses of scalb*() and significand*() this is fixed.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2023-01-05 17:01 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-11 9:41 [Bug modula2/107631] New: many tests don't link on Mac OS X 10.7 ro at gcc dot gnu.org
2022-11-11 10:53 ` [Bug modula2/107631] " gaius at gcc dot gnu.org
2022-12-20 0:15 ` iains at gcc dot gnu.org
2022-12-20 0:18 ` iains at gcc dot gnu.org
2023-01-05 16:55 ` cvs-commit at gcc dot gnu.org
2023-01-05 17:01 ` iains at gcc dot gnu.org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).