From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id EF0D6389000C; Thu, 20 Jun 2024 17:46:17 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org EF0D6389000C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1718905577; bh=z2AWzJlZtgYEeMA/4s67PiZBGiS2n0IxSIDf62GcJ/c=; h=From:To:Subject:Date:In-Reply-To:References:From; b=aDqkPK/Zfrp9QfXV7qjvj39dqQHeyx2j96EP1LWjSeiUTvtmYtwpuB3xr4RmlzZ7R 7zt0iP7YNn8Cvhchv/agY2lLZY90t+6hKuwxE2xfNnc2+b8GInCHIPFoAjvoxWjK9i opUZ5fVqYM/oFuuzRaJASx1iDIGXeXAzqInrTPC0= From: "dilfridge at gentoo dot org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/115526] [14/15 regression] invalid assember emitted for alpha, "Error: duplicate !tlsgd!62" Date: Thu, 20 Jun 2024 17:46:15 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 14.1.1 X-Bugzilla-Keywords: assemble-failure X-Bugzilla-Severity: normal X-Bugzilla-Who: dilfridge at gentoo dot org X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 14.2 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D115526 --- Comment #4 from Andreas K. Huettel --- 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=3Dev4 -fwrapv -std=3Dc11 \ -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -Wstrict-prototypes -Werror=3Dimplicit-function-declaration \ -fvisibility=3Dhidden -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: =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D 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 =3D _Py_tss_tstate.interp; interp->freelist[v->k] =3D v; } } static Bigint *pow5mult(Bigint *b) { for (;;) { if (pow5mult_k & 1) { Bfree(b); if (b =3D=3D 0) return 0; } if (!(pow5mult_k >>=3D 1)) break; } } void _Py_dg_strtod() { if (_Py_dg_strtod_ndigits) pow5mult(_Py_dg_strtod_bs); } =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D 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=E2=80=99t a prototype [-Wstrict-prototypes] 15 | void PyMem_Free(); | ^~~~ dtoa.i:36:6: warning: function declaration isn=E2=80=99t a prototype [-Wstrict-prototypes] 36 | void _Py_dg_strtod() { | ^~~~~~~~~~~~~ {standard input}: Assembler messages: {standard input}:140: Error: duplicate !tlsgd!6=