public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug modula2/102342] New: gm2 testsuite failures for non-default multilib
@ 2021-09-15 9:58 ro at gcc dot gnu.org
2021-10-25 11:41 ` [Bug modula2/102342] " ro at gcc dot gnu.org
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: ro at gcc dot gnu.org @ 2021-09-15 9:58 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102342
Bug ID: 102342
Summary: gm2 testsuite failures for non-default multilib
Product: gcc
Version: 12.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: modula2
Assignee: unassigned at gcc dot gnu.org
Reporter: ro at gcc dot gnu.org
Target Milestone: ---
When running the gm2 testsuite for non-default multilibs (e.g.
x86_64-pc-linux-gnu
for the default (-m64) and -m32, or i386-pc-solaris2.11 for the default -m32
and
-m64), many tests for the non-default multilib FAIL, e.g.
FAIL: gm2/calling-c/datatypes/unbounded/run/pass/m.mod compilation, -g
UNRESOLVED: gm2/calling-c/datatypes/unbounded/run/pass/m.mod execution, -g
(link failed)
/vol/gcc/bin/gld-2.35: i386:x86-64 architecture of input file
`/tmp/ccTE5Kph.a(c.o)' is incompatible with i386 output
While the main testcase is correctly compiled with the necessary multilib flags
(-m32 here), additional objects (c.o here) are not. The common problem is that
those compilations are done manually with an explicit
set output [exec ${XGCC} -B[file dirname $rootme]/gcc -g -c
$srcdir/gm2/calling-c/datatypes/unbounded/run/pass/c.c -o c.o]
in gm2.exp, not taking multilib flags into account.
There are two ways to do this correctly. One is to do the compilation with
target_compile like this:
-- gm2.exp 2021-07-08 14:07:03.408049578 +0000
+++ m2.exp 2021-09-15 11:50:06.344101169 +0000
@@ -29,14 +29,9 @@
set gm2src ${srcdir}/../m2
gm2_init_pim "${srcdir}/gm2/calling-c/datatypes/unbounded/run/pass"
-
-set XGCC [lookfor_file $rootme xgcc];
-
gm2_link_with "c.o -lm2pim -lm2iso -lpthread"
-
-set output [exec rm -f c.o]
-set output [exec ${XGCC} -B[file dirname $rootme]/gcc -g -c
$srcdir/gm2/calling-c/datatypes/unbounded/run/pass/c.c -o c.o]
+set output [target_compile $srcdir/$subdir/c.c c.o object "-g"]
foreach testcase [lsort [glob -nocomplain $srcdir/$subdir/*.mod]] {
# If we're only testing specific files and this isn't one of them, skip
it.
@@ -47,5 +42,3 @@
gm2_target_compile $srcdir/$subdir/m.mod m.o object "-g"
gm2-torture-execute $testcase "" "pass"
}
-
-set output [exec rm -f c.o]
The other, canonical one, is to use dg-additonal-sources instead, avoiding the
need for special driver files.
The above patch fixed the issue on i386-pc-solaris2.11 with -m32/-m64.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug modula2/102342] gm2 testsuite failures for non-default multilib
2021-09-15 9:58 [Bug modula2/102342] New: gm2 testsuite failures for non-default multilib ro at gcc dot gnu.org
@ 2021-10-25 11:41 ` ro at gcc dot gnu.org
2022-04-23 11:52 ` gaius at gcc dot gnu.org
2022-04-26 9:40 ` ro at CeBiTec dot Uni-Bielefeld.DE
2 siblings, 0 replies; 4+ messages in thread
From: ro at gcc dot gnu.org @ 2021-10-25 11:41 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102342
--- Comment #1 from Rainer Orth <ro at gcc dot gnu.org> ---
Created attachment 51660
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=51660&action=edit
proposed patch
While testing a recent version of the modula-2 branch
(386e7057d75043439f313085c4cbde8109459915),
I developed the attached patch to fully address this issue, following the
prove-of-concept one already included. With this patch, x86_64-pc-linux-gnu
testresults (both -m64 and -m32 multilibs) are clean with the exception of
Running target unix/-m32
FAIL: gm2/cpp/pass/subaddr.mod, -O
FAIL: gm2/cpp/pass/subaddr.mod, -O -g
FAIL: gm2/cpp/pass/subaddr.mod, -O3 -fomit-frame-pointer
FAIL: gm2/cpp/pass/subaddr.mod, -O3 -fomit-frame-pointer -finline-functions
FAIL: gm2/cpp/pass/subaddr.mod, -Os
FAIL: gm2/cpp/pass/subaddr.mod, -g
which is preexisting (PR modula2/102343). On i386-pc-solaris2.11, there are a
few more failures, also preexisting.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug modula2/102342] gm2 testsuite failures for non-default multilib
2021-09-15 9:58 [Bug modula2/102342] New: gm2 testsuite failures for non-default multilib ro at gcc dot gnu.org
2021-10-25 11:41 ` [Bug modula2/102342] " ro at gcc dot gnu.org
@ 2022-04-23 11:52 ` gaius at gcc dot gnu.org
2022-04-26 9:40 ` ro at CeBiTec dot Uni-Bielefeld.DE
2 siblings, 0 replies; 4+ messages in thread
From: gaius at gcc dot gnu.org @ 2022-04-23 11:52 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102342
Gaius Mulley <gaius at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |gaius at gcc dot gnu.org
Resolution|--- |FIXED
Status|UNCONFIRMED |RESOLVED
--- Comment #2 from Gaius Mulley <gaius at gcc dot gnu.org> ---
Many thanks for the patch - now applied to the modula2 branch of gcc-12.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug modula2/102342] gm2 testsuite failures for non-default multilib
2021-09-15 9:58 [Bug modula2/102342] New: gm2 testsuite failures for non-default multilib ro at gcc dot gnu.org
2021-10-25 11:41 ` [Bug modula2/102342] " ro at gcc dot gnu.org
2022-04-23 11:52 ` gaius at gcc dot gnu.org
@ 2022-04-26 9:40 ` ro at CeBiTec dot Uni-Bielefeld.DE
2 siblings, 0 replies; 4+ messages in thread
From: ro at CeBiTec dot Uni-Bielefeld.DE @ 2022-04-26 9:40 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102342
--- Comment #3 from ro at CeBiTec dot Uni-Bielefeld.DE <ro at CeBiTec dot Uni-Bielefeld.DE> ---
> --- Comment #2 from Gaius Mulley <gaius at gcc dot gnu.org> ---
> Many thanks for the patch - now applied to the modula2 branch of gcc-12.
Thanks. I can confirm that this worked fine on both
i386-pc-solaris2.11, i686-pc-linux-gnu, and x86_64-pc-linux-gnu.
Unfortunately, I hit quite a number of new issues breaking the build on
either or all of these targets. I'll report them separately.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-04-26 9:40 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-15 9:58 [Bug modula2/102342] New: gm2 testsuite failures for non-default multilib ro at gcc dot gnu.org
2021-10-25 11:41 ` [Bug modula2/102342] " ro at gcc dot gnu.org
2022-04-23 11:52 ` gaius at gcc dot gnu.org
2022-04-26 9:40 ` ro at CeBiTec dot Uni-Bielefeld.DE
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).