Bug 104749 - [12/13 regression] stage1 d21 fails to link on Solaris/x86
Summary: [12/13 regression] stage1 d21 fails to link on Solaris/x86
Status: UNCONFIRMED
Alias: None
Product: gcc
Classification: Unclassified
Component: d (show other bugs)
Version: 12.0
: P3 normal
Target Milestone: 12.2
Assignee: Iain Buclaw
URL:
Keywords: build, documentation
Depends on:
Blocks:
 
Reported: 2022-03-01 19:13 UTC by Rainer Orth
Modified: 2022-05-06 08:32 UTC (History)
0 users

See Also:
Host:
Target: i?86-pc-solaris2.11
Build:
Known to work: 10.1.0, 11.1.0, 9.4.0
Known to fail: 9.1.0, 9.2.0, 9.3.0
Last reconfirmed:


Attachments
32-bit i386-pc-solaris2.11 statementsem.s with gdc 9.1.0 (469.10 KB, application/x-xz)
2022-03-01 19:18 UTC, Rainer Orth
Details
32-bit i386-pc-solaris2.11 typesem.s with gdc 9.1.0 (447.42 KB, application/x-xz)
2022-03-01 19:18 UTC, Rainer Orth
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Rainer Orth 2022-03-01 19:13:36 UTC
Between 20220228 (3f3246eb16f554c70c5ce87ad2c785f83adb4625) and 20220301 (673a10aee1aafe0c99bfadc29a7458339bdddb3a),
stage1 d21 fails to link on Solaris/x86:

ld: fatal: symbol '___s.24736' is multiply-defined:
        (file d/statementsem.o type=OBJT; file d/typesem.o type=OBJT);
ld: fatal: symbol '___s.24712' is multiply-defined:
        (file d/statementsem.o type=OBJT; file d/typesem.o type=OBJT);

This doesn't happen on Solaris/SPARC, though.

This is with gdc 9.1.0 as bootstrap compiler.  The problem seems to vanish
(haven't run a full bootstrap yet) with gdc 11.1.0, and gdc 9.1.0 -m64 (i.e.
building an amd64-pc-solaris2.11 compiler) works, too.

I'll attach the assembler output.
Comment 1 Rainer Orth 2022-03-01 19:18:11 UTC
Created attachment 52540 [details]
32-bit i386-pc-solaris2.11 statementsem.s with gdc 9.1.0
Comment 2 Rainer Orth 2022-03-01 19:18:40 UTC
Created attachment 52541 [details]
32-bit i386-pc-solaris2.11 typesem.s with gdc 9.1.0
Comment 3 Richard Biener 2022-03-02 08:56:59 UTC
So this is a gdc 9.1.0 bug then, not a GCC 12 issue?  (did you try 9.3?)
Comment 4 ro@CeBiTec.Uni-Bielefeld.DE 2022-03-02 09:39:05 UTC
> --- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
> So this is a gdc 9.1.0 bug then, not a GCC 12 issue?  (did you try 9.3?)

It seems so, yes.  Yet gdc 9.1.0 was good enough until now, and if
there's an issue, the requirement should at least be documented.

I'm currently running a bootstrap with gdc 11.1.0 instead, which is well
into make check.

Will try gdc 9.4.0 (which is currently building, switching from gas 2.32
to 2.38 if that matters) afterwards.
Comment 5 ro@CeBiTec.Uni-Bielefeld.DE 2022-03-03 12:11:57 UTC
> --- Comment #4 from ro at CeBiTec dot Uni-Bielefeld.DE <ro at CeBiTec dot
> Will try gdc 9.4.0 (which is currently building, switching from gas 2.32
> to 2.38 if that matters) afterwards.

Both gdc 11.1.0 and gdc 9.4.0 work fine.
Comment 6 Iain Buclaw 2022-03-03 12:35:22 UTC
Just having a look around, I couldn't see anywhere that `___s` would be created now.

Then I came across r9-8460, which was fixed for 10.1.0, and backported before 9.4.0 was released.  Linked bug report is pr d/94240.

In that case then, earlier versions of version 9 might not work correctly.
Comment 7 Richard Biener 2022-03-09 10:28:34 UTC
So maybe amend install.texi
Comment 8 Jakub Jelinek 2022-05-06 08:32:51 UTC
GCC 12.1 is being released, retargeting bugs to GCC 12.2.