* [Bug target/115526] regression in 14: invalid assember emitted for alpha, "Error: duplicate !tlsgd!62"
2024-06-17 18:23 [Bug target/115526] New: regression in 14: invalid assember emitted for alpha, "Error: duplicate !tlsgd!62" dilfridge at gentoo dot org
@ 2024-06-17 18:24 ` dilfridge at gentoo dot org
2024-06-17 18:24 ` dilfridge at gentoo dot org
` (10 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: dilfridge at gentoo dot org @ 2024-06-17 18:24 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115526
--- Comment #1 from Andreas K. Huettel <dilfridge at gentoo dot org> ---
Created attachment 58453
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=58453&action=edit
preprocessed source file
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug target/115526] regression in 14: invalid assember emitted for alpha, "Error: duplicate !tlsgd!62"
2024-06-17 18:23 [Bug target/115526] New: regression in 14: invalid assember emitted for alpha, "Error: duplicate !tlsgd!62" dilfridge at gentoo dot org
2024-06-17 18:24 ` [Bug target/115526] " dilfridge at gentoo dot org
@ 2024-06-17 18:24 ` dilfridge at gentoo dot org
2024-06-17 20:50 ` [Bug target/115526] [14/15 regression] " pinskia at gcc dot gnu.org
` (9 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: dilfridge at gentoo dot org @ 2024-06-17 18:24 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115526
--- Comment #2 from Andreas K. Huettel <dilfridge at gentoo dot org> ---
Created attachment 58454
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=58454&action=edit
assembler source file
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug target/115526] [14/15 regression] invalid assember emitted for alpha, "Error: duplicate !tlsgd!62"
2024-06-17 18:23 [Bug target/115526] New: regression in 14: invalid assember emitted for alpha, "Error: duplicate !tlsgd!62" dilfridge at gentoo dot org
2024-06-17 18:24 ` [Bug target/115526] " dilfridge at gentoo dot org
2024-06-17 18:24 ` dilfridge at gentoo dot org
@ 2024-06-17 20:50 ` pinskia at gcc dot gnu.org
2024-06-17 20:54 ` pinskia at gcc dot gnu.org
` (8 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-06-17 20:50 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115526
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |14.2
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug target/115526] [14/15 regression] invalid assember emitted for alpha, "Error: duplicate !tlsgd!62"
2024-06-17 18:23 [Bug target/115526] New: regression in 14: invalid assember emitted for alpha, "Error: duplicate !tlsgd!62" dilfridge at gentoo dot org
` (2 preceding siblings ...)
2024-06-17 20:50 ` [Bug target/115526] [14/15 regression] " pinskia at gcc dot gnu.org
@ 2024-06-17 20:54 ` pinskia at gcc dot gnu.org
2024-06-20 17:46 ` dilfridge at gentoo dot org
` (7 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-06-17 20:54 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115526
--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
beq $10,$L293
lda $13,_Py_tss_tstate($29) !tlsgd!62
...
$L293:
lda $16,1($31)
ldq $27,Balloc($29) !literal!78
jsr $26,($27),0 !lituse_jsr!78
ldah $29,0($26) !gpdisp!79
lda $29,0($29) !gpdisp!79
mov $0,$10
beq $0,$L260
lda $1,625($31)
stl $1,24($0)
lda $1,1($31)
stl $1,20($0)
stq $0,5288($12)
lda $13,_Py_tss_tstate($29) !tlsgd!62
stq $31,0($0)
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug target/115526] [14/15 regression] invalid assember emitted for alpha, "Error: duplicate !tlsgd!62"
2024-06-17 18:23 [Bug target/115526] New: regression in 14: invalid assember emitted for alpha, "Error: duplicate !tlsgd!62" dilfridge at gentoo dot org
` (3 preceding siblings ...)
2024-06-17 20:54 ` pinskia at gcc dot gnu.org
@ 2024-06-20 17:46 ` dilfridge at gentoo dot org
2024-06-30 9:51 ` dilfridge at gentoo dot org
` (6 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: dilfridge at gentoo dot org @ 2024-06-20 17:46 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115526
--- Comment #4 from Andreas K. Huettel <dilfridge at gentoo dot org> ---
Here's what cvise came up with as minimal test case.
1) compile command:
alpha-unknown-linux-gnu-gcc -c -fno-strict-overflow -Wsign-compare -mieee
-DNDEBUG -mieee -pipe -O2 -mcpu=ev4 -fwrapv -std=c11 \
-Wextra -Wno-unused-parameter -Wno-missing-field-initializers
-Wstrict-prototypes -Werror=implicit-function-declaration \
-fvisibility=hidden -fPIC -DPy_BUILD_CORE -o test $1
2) interestingness test:
/home/huettel/alpha-bug/compile.sh dtoa.i 2>&1 | grep 'Error: duplicate
!tlsgd!'
3) output:
======================
struct _ts {
struct _dtoa_state *interp
};
struct Bigint {
int k
} *_Py_dg_strtod_bs;
struct _dtoa_state {
struct Bigint p5s;
struct Bigint *freelist[]
};
extern _Thread_local struct _ts _Py_tss_tstate;
typedef struct Bigint Bigint;
int pow5mult_k;
long _Py_dg_strtod_ndigits;
void PyMem_Free();
void Bfree(Bigint *v) {
if (v)
if (v->k)
PyMem_Free();
else {
struct _dtoa_state *interp = _Py_tss_tstate.interp;
interp->freelist[v->k] = v;
}
}
static Bigint *pow5mult(Bigint *b) {
for (;;) {
if (pow5mult_k & 1) {
Bfree(b);
if (b == 0)
return 0;
}
if (!(pow5mult_k >>= 1))
break;
}
}
void _Py_dg_strtod() {
if (_Py_dg_strtod_ndigits)
pow5mult(_Py_dg_strtod_bs);
}
======================
4) double-check:
huettel@crossdev ~/alpha-bug $ ./compile.sh dtoa.i
dtoa.i:3:1: warning: no semicolon at end of struct or union
3 | };
| ^
dtoa.i:6:1: warning: no semicolon at end of struct or union
6 | } *_Py_dg_strtod_bs;
| ^
dtoa.i:10:1: warning: no semicolon at end of struct or union
10 | };
| ^
dtoa.i:15:1: warning: function declaration isn’t a prototype
[-Wstrict-prototypes]
15 | void PyMem_Free();
| ^~~~
dtoa.i:36:6: warning: function declaration isn’t a prototype
[-Wstrict-prototypes]
36 | void _Py_dg_strtod() {
| ^~~~~~~~~~~~~
{standard input}: Assembler messages:
{standard input}:140: Error: duplicate !tlsgd!6
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug target/115526] [14/15 regression] invalid assember emitted for alpha, "Error: duplicate !tlsgd!62"
2024-06-17 18:23 [Bug target/115526] New: regression in 14: invalid assember emitted for alpha, "Error: duplicate !tlsgd!62" dilfridge at gentoo dot org
` (4 preceding siblings ...)
2024-06-20 17:46 ` dilfridge at gentoo dot org
@ 2024-06-30 9:51 ` dilfridge at gentoo dot org
2024-06-30 15:24 ` dilfridge at gentoo dot org
` (5 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: dilfridge at gentoo dot org @ 2024-06-30 9:51 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115526
Andreas K. Huettel <dilfridge at gentoo dot org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |amacleod at redhat dot com
--- Comment #5 from Andreas K. Huettel <dilfridge at gentoo dot org> ---
I tried bisecting this, and the result is ... puzzling.
a291237b628f419d7f7ac264dd7b42947b565222 is the first bad commit
commit a291237b628f419d7f7ac264dd7b42947b565222
Author: Andrew MacLeod <amacleod@redhat.com>
Date: Tue Oct 31 11:51:34 2023 -0400
Remove simple ranges from trailing zero bitmasks.
During the intersection operation, it can be helpful to remove any
low-end ranges when the bitmask has trailing zeros. This prevents
obviously incorrect ranges from appearing without requiring a bitmask
check.
* value-range.cc (irange_bitmask::adjust_range): New.
(irange::intersect_bitmask): Call adjust_range.
* value-range.h (irange_bitmask::adjust_range): New prototype.
gcc/value-range.cc | 30 ++++++++++++++++++++++++++++++
gcc/value-range.h | 2 ++
2 files changed, 32 insertions(+)
bisect found first bad commit
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug target/115526] [14/15 regression] invalid assember emitted for alpha, "Error: duplicate !tlsgd!62"
2024-06-17 18:23 [Bug target/115526] New: regression in 14: invalid assember emitted for alpha, "Error: duplicate !tlsgd!62" dilfridge at gentoo dot org
` (5 preceding siblings ...)
2024-06-30 9:51 ` dilfridge at gentoo dot org
@ 2024-06-30 15:24 ` dilfridge at gentoo dot org
2024-06-30 15:30 ` [Bug target/115526] [14/15 regression] invalid assember emitted for alpha, "Error: duplicate !tlsgd!62" since r14-5109-ga291237b628f41 sjames at gcc dot gnu.org
` (4 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: dilfridge at gentoo dot org @ 2024-06-30 15:24 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115526
--- Comment #6 from Andreas K. Huettel <dilfridge at gentoo dot org> ---
for reference...
crossdev ~/bisection/gcc # git bisect log
git bisect start
# status: waiting for both good and bad commits
# good: [c042baa99ef0cb1c1711cd913822ce1e7354f144] testsuite, Darwin: Remove an
unnecessary flags addition.
git bisect good c042baa99ef0cb1c1711cd913822ce1e7354f144
# status: waiting for bad commit, 1 good commit known
# bad: [47cbc76568b9f8bfbdcf93845ea17cbf8a0ceba1] Daily bump.
git bisect bad 47cbc76568b9f8bfbdcf93845ea17cbf8a0ceba1
# good: [8e08c7886eed5824bebd0e011526ec302d622844] ipa: Fix double
reference-count decrements for the same edge (PR 107769, PR 109318)
git bisect good 8e08c7886eed5824bebd0e011526ec302d622844
# bad: [942ff588ba257d530b671019716275f9ef04041d] RISC-V regression test: Fix
FAIL of bb-slp-39.c
git bisect bad 942ff588ba257d530b671019716275f9ef04041d
# good: [caabf0973a4e9a26421c94d540e3e20051e93e77] Include insn-opinit.h in
PLUGIN_H [PR110610]
git bisect good caabf0973a4e9a26421c94d540e3e20051e93e77
# good: [75f069a6403b5d4217fb5b654a9c656b4dca9dc1] RISC-V: Remove unused
structure in cost model
git bisect good 75f069a6403b5d4217fb5b654a9c656b4dca9dc1
# good: [7c76c876e917a1f20a788f602cc78fff7d0a2a65] Fix missed CSE with a
BLKmode entity
git bisect good 7c76c876e917a1f20a788f602cc78fff7d0a2a65
# good: [83e24e8c1e5eb3366e35d5b8494a4cd9a2395b59] LoongArch: Use explicit
relocs for addresses only used for one load or store with
-mexplicit-relocs=auto and -mcmodel={normal,medium}
git bisect good 83e24e8c1e5eb3366e35d5b8494a4cd9a2395b59
# good: [31cc9824d1cd5e0f7fa145d0831a923479333cd6] ARC: Improved ARC
rtx_costs/insn_cost for SHIFTs and ROTATEs.
git bisect good 31cc9824d1cd5e0f7fa145d0831a923479333cd6
# good: [8c8ad4e3533b8590ce063386b8b32f6fce1c3942] Fortran: Defined operators
with unlimited polymorphic args [PR98498]
git bisect good 8c8ad4e3533b8590ce063386b8b32f6fce1c3942
# bad: [4dbb14c26dafe70ee4bef5fdf8df39d001dd56f1] i386: Add LEGACY_INDEX_REG
register class.
git bisect bad 4dbb14c26dafe70ee4bef5fdf8df39d001dd56f1
# bad: [5340f48b7639fcc874f64aac214f9ef9ae43d43e] Fortran: fix issue with
multiple references of a procedure pointer [PR97245]
git bisect bad 5340f48b7639fcc874f64aac214f9ef9ae43d43e
# good: [4bfc5091a6a489d9fa5558f0fbcff11d65e1837b] Format gotools.sum closer to
what DejaGnu does
git bisect good 4bfc5091a6a489d9fa5558f0fbcff11d65e1837b
# bad: [a291237b628f419d7f7ac264dd7b42947b565222] Remove simple ranges from
trailing zero bitmasks.
git bisect bad a291237b628f419d7f7ac264dd7b42947b565222
# good: [95cfa2cdd1b525a5b2830206692ddb9f948000d3] Cleanup
vectorizable_live_operation
git bisect good 95cfa2cdd1b525a5b2830206692ddb9f948000d3
# good: [751fc7bcdcdf25e7cc0d9821f69313b6571a62e3] i386: Handle multiple
address register classes
git bisect good 751fc7bcdcdf25e7cc0d9821f69313b6571a62e3
# first bad commit: [a291237b628f419d7f7ac264dd7b42947b565222] Remove simple
ranges from trailing zero bitmasks.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug target/115526] [14/15 regression] invalid assember emitted for alpha, "Error: duplicate !tlsgd!62" since r14-5109-ga291237b628f41
2024-06-17 18:23 [Bug target/115526] New: regression in 14: invalid assember emitted for alpha, "Error: duplicate !tlsgd!62" dilfridge at gentoo dot org
` (6 preceding siblings ...)
2024-06-30 15:24 ` dilfridge at gentoo dot org
@ 2024-06-30 15:30 ` sjames at gcc dot gnu.org
2024-06-30 16:00 ` ubizjak at gmail dot com
` (3 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: sjames at gcc dot gnu.org @ 2024-06-30 15:30 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115526
Sam James <sjames at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |ubizjak at gmail dot com
--- Comment #7 from Sam James <sjames at gcc dot gnu.org> ---
Uros, is there any chance you'd be so kind to take a look?
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug target/115526] [14/15 regression] invalid assember emitted for alpha, "Error: duplicate !tlsgd!62" since r14-5109-ga291237b628f41
2024-06-17 18:23 [Bug target/115526] New: regression in 14: invalid assember emitted for alpha, "Error: duplicate !tlsgd!62" dilfridge at gentoo dot org
` (7 preceding siblings ...)
2024-06-30 15:30 ` [Bug target/115526] [14/15 regression] invalid assember emitted for alpha, "Error: duplicate !tlsgd!62" since r14-5109-ga291237b628f41 sjames at gcc dot gnu.org
@ 2024-06-30 16:00 ` ubizjak at gmail dot com
2024-07-01 11:13 ` ubizjak at gmail dot com
` (2 subsequent siblings)
11 siblings, 0 replies; 13+ messages in thread
From: ubizjak at gmail dot com @ 2024-06-30 16:00 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115526
--- Comment #8 from Uroš Bizjak <ubizjak at gmail dot com> ---
(In reply to Sam James from comment #7)
> Uros, is there any chance you'd be so kind to take a look?
I'm afraid that this is not some dead-simple issue that I can fix without the
access to the alpha machine.
Other that that, it is not possible to enable LRA for alpha for !BWX arch (see
PR66207#c10), so everything less than ev56 is (or will be) obsolete soon.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug target/115526] [14/15 regression] invalid assember emitted for alpha, "Error: duplicate !tlsgd!62" since r14-5109-ga291237b628f41
2024-06-17 18:23 [Bug target/115526] New: regression in 14: invalid assember emitted for alpha, "Error: duplicate !tlsgd!62" dilfridge at gentoo dot org
` (8 preceding siblings ...)
2024-06-30 16:00 ` ubizjak at gmail dot com
@ 2024-07-01 11:13 ` ubizjak at gmail dot com
2024-07-01 11:14 ` ubizjak at gmail dot com
2024-07-01 21:06 ` dilfridge at gentoo dot org
11 siblings, 0 replies; 13+ messages in thread
From: ubizjak at gmail dot com @ 2024-07-01 11:13 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115526
Uroš Bizjak <ubizjak at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2024-07-01
Ever confirmed|0 |1
Assignee|unassigned at gcc dot gnu.org |ubizjak at gmail dot com
--- Comment #9 from Uroš Bizjak <ubizjak at gmail dot com> ---
Created attachment 58549
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=58549&action=edit
Proposed patch
Add missing "cannot_copy" attribute to instructions that have to stay in 1-1
correspondence with another insn.
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug target/115526] [14/15 regression] invalid assember emitted for alpha, "Error: duplicate !tlsgd!62" since r14-5109-ga291237b628f41
2024-06-17 18:23 [Bug target/115526] New: regression in 14: invalid assember emitted for alpha, "Error: duplicate !tlsgd!62" dilfridge at gentoo dot org
` (9 preceding siblings ...)
2024-07-01 11:13 ` ubizjak at gmail dot com
@ 2024-07-01 11:14 ` ubizjak at gmail dot com
2024-07-01 21:06 ` dilfridge at gentoo dot org
11 siblings, 0 replies; 13+ messages in thread
From: ubizjak at gmail dot com @ 2024-07-01 11:14 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115526
--- Comment #10 from Uroš Bizjak <ubizjak at gmail dot com> ---
(In reply to Uroš Bizjak from comment #9)
> Created attachment 58549 [details]
> Proposed patch
Can someone please regression test the attached patch?
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug target/115526] [14/15 regression] invalid assember emitted for alpha, "Error: duplicate !tlsgd!62" since r14-5109-ga291237b628f41
2024-06-17 18:23 [Bug target/115526] New: regression in 14: invalid assember emitted for alpha, "Error: duplicate !tlsgd!62" dilfridge at gentoo dot org
` (10 preceding siblings ...)
2024-07-01 11:14 ` ubizjak at gmail dot com
@ 2024-07-01 21:06 ` dilfridge at gentoo dot org
11 siblings, 0 replies; 13+ messages in thread
From: dilfridge at gentoo dot org @ 2024-07-01 21:06 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115526
--- Comment #11 from Andreas K. Huettel <dilfridge at gentoo dot org> ---
(In reply to Uroš Bizjak from comment #10)
> (In reply to Uroš Bizjak from comment #9)
> > Created attachment 58549 [details]
> > Proposed patch
>
> Can someone please regression test the attached patch?
More in a bit, but:
Applied to 14 branch tip, the patch indeed makes the minimal test case compile.
^ permalink raw reply [flat|nested] 13+ messages in thread