From nobody Sun Sep 11 09:04:31 2022 X-Original-To: freebsd-ports@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4MQP1l02nVz4cM5k for ; Sun, 11 Sep 2022 09:04:43 +0000 (UTC) (envelope-from phascolarctos@protonmail.ch) Received: from mail-40133.protonmail.ch (mail-40133.protonmail.ch [185.70.40.133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "protonmail.com", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4MQP1j4k0Wz3WJW for ; Sun, 11 Sep 2022 09:04:41 +0000 (UTC) (envelope-from phascolarctos@protonmail.ch) Date: Sun, 11 Sep 2022 09:04:31 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.ch; s=protonmail3; t=1662887078; x=1663146278; bh=tqgAsrFRkXRirFhi5gf/Rej0W3mXeUNwqbmRn1Mph4g=; h=Date:To:From:Cc:Reply-To:Subject:Message-ID:In-Reply-To: References:Feedback-ID:From:To:Cc:Date:Subject:Reply-To: Feedback-ID:Message-ID; b=kP1zriPat+ZYJc+SfivcGrrBftY0WeY1yjIgQ2t0OfS2uRviJtoXZDjwoBPWJ31ih zxTQ84FvPVW7ez9l8BmCwU51O3UnRZ+ZFgQrbAR0LH8s1o/qFQWCe3mM2PK78KiIcO mFM2SYhsWtpvruWx+QpPRKSLVOktxeottwX2cGO5rxrsYGxnsVZFtgRtTndHEayPCq +vMW1RIlR00ujovj72nHTCZOh1VrQ3JeR7/QKiehKlqUbcvlyK2kkU5XvwGmAiSvw2 smaKPI1f5q4BQyE2L+gaQR7E/GwXPULw0sIoYlzxvSlXVA1U2HFD01sZE60/We2zk7 58bGAZP4FBwnQ== To: Mark Millard From: Lorenzo Salvadore Cc: FreeBSD Toolchain , FreeBSD Mailing List Reply-To: Lorenzo Salvadore Subject: Re: lang/gcc12 's g++12 gets a failure on aarch64 FreeBSD (main) but not on aarch64 Fedora (36), small test case Message-ID: <5T6hqjycYy4YYKvw5nXon_xY9KeiiyI3SqHjD07MbHj79un1XGi3AvhFF02Do-8fthrShlq8QEdhwh1ZZB0OgGQaF8tqsYTcVycUlbvOY_I=@protonmail.ch> In-Reply-To: <913100F3-F0DC-45F0-BF08-8D4146276636@yahoo.com> References: <913100F3-F0DC-45F0-BF08-8D4146276636.ref@yahoo.com> <913100F3-F0DC-45F0-BF08-8D4146276636@yahoo.com> Feedback-ID: 8540510:user:proton List-Id: Porting software to FreeBSD List-Archive: https://lists.freebsd.org/archives/freebsd-ports List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-ports@freebsd.org X-BeenThere: freebsd-ports@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Rspamd-Queue-Id: 4MQP1j4k0Wz3WJW X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=protonmail.ch header.s=protonmail3 header.b=kP1zriPa; dmarc=pass (policy=quarantine) header.from=protonmail.ch; spf=pass (mx1.freebsd.org: domain of phascolarctos@protonmail.ch designates 185.70.40.133 as permitted sender) smtp.mailfrom=phascolarctos@protonmail.ch X-Spamd-Result: default: False [-3.94 / 15.00]; NEURAL_HAM_SHORT(-1.00)[-0.998]; NEURAL_HAM_LONG(-0.97)[-0.974]; NEURAL_HAM_MEDIUM(-0.97)[-0.973]; DMARC_POLICY_ALLOW(-0.50)[protonmail.ch,quarantine]; R_SPF_ALLOW(-0.20)[+ip4:185.70.40.0/24]; R_DKIM_ALLOW(-0.20)[protonmail.ch:s=protonmail3]; MIME_GOOD(-0.10)[text/plain]; MLMMJ_DEST(0.00)[freebsd-ports@freebsd.org]; MIME_TRACE(0.00)[0:+]; FREEMAIL_TO(0.00)[yahoo.com]; FROM_EQ_ENVFROM(0.00)[]; RCVD_COUNT_ZERO(0.00)[0]; HAS_REPLYTO(0.00)[phascolarctos@protonmail.ch]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; REPLYTO_EQ_FROM(0.00)[]; ARC_NA(0.00)[]; DKIM_TRACE(0.00)[protonmail.ch:+]; FROM_HAS_DN(0.00)[]; ASN(0.00)[asn:62371, ipnet:185.70.40.0/24, country:CH]; RCPT_COUNT_THREE(0.00)[3]; MID_RHS_MATCH_FROM(0.00)[] X-ThisMailContainsUnwantedMimeParts: N ------- Original Message ------- On Saturday, September 3rd, 2022 at 23:24, Mark Millard = wrote: >=20 >=20 > On aarch64 FreeBSD (see the comment for the failure message): >=20 > // g++12 -std=3Dc++20 -fmodules-ts -xc++-system-header memory > // g++12 -std=3Dc++20 -fmodules-ts -c gpp12_module_dynamic_pointer_cast_f= ailure.cpp > // > // gets: > // > // during IPA pass: visibility > // gpp12_dynamic_pointer_cast_failure.cpp:21:1: internal compiler error: = in function_and_variable_visibility, at ipa-visibility.cc:716 > // 21 | } > // | ^ >=20 > import ; >=20 >=20 > struct data > { > virtual ~data() =3D default; > }; >=20 > void test(std::shared_ptr b) >=20 > { > auto dpc =3D std::dynamic_pointer_cast(b); >=20 > } >=20 >=20 >=20 >=20 > Note: On FreeBSD, I do my own poudriere-devel based port builds > and install the resulting packages. For reference: >=20 > # g++12 -v > Using built-in specs. > COLLECT_GCC=3Dg++12 > COLLECT_LTO_WRAPPER=3D/usr/local/libexec/gcc12/gcc/aarch64-portbld-freebs= d14.0/12.2.0/lto-wrapper > Target: aarch64-portbld-freebsd14.0 > Configured with: /wrkdirs/usr/ports/lang/gcc12/work/gcc-12.2.0/configure = --disable-multilib --disable-bootstrap --disable-nls --enable-gnu-indirect-= function --enable-host-shared --enable-plugin --libdir=3D/usr/local/lib/gcc= 12 --libexecdir=3D/usr/local/libexec/gcc12 --program-suffix=3D12 --with-as= =3D/usr/local/bin/as --with-gmp=3D/usr/local --with-gxx-include-dir=3D/usr/= local/lib/gcc12/include/c++/ --with-gxx-libcxx-include-dir=3D/usr/include/c= ++/v1 --with-ld=3D/usr/local/bin/ld --with-pkgversion=3D'FreeBSD Ports Coll= ection' --with-system-zlib --without-zstd --enable-languages=3Dc,c++,objc,f= ortran,jit --prefix=3D/usr/local --localstatedir=3D/var --mandir=3D/usr/loc= al/man --infodir=3D/usr/local/share/info/gcc12 --build=3Daarch64-portbld-fr= eebsd14.0 > Thread model: posix > Supported LTO compression algorithms: zlib > gcc version 12.2.0 (FreeBSD Ports Collection) >=20 >=20 >=20 >=20 > There was no such failure on fedora 36 via: >=20 > # c++ -std=3Dc++20 -fmodules-ts -xc++-system-header memory > # c++ -std=3Dc++20 -freport-bug -fmodules-ts -c gpp12_module_dynamic_poin= ter_cast_failure.cpp > # >=20 > where: >=20 > # c++ -v > Using built-in specs. > COLLECT_GCC=3Dc++ > COLLECT_LTO_WRAPPER=3D/usr/libexec/gcc/aarch64-redhat-linux/12/lto-wrappe= r > Target: aarch64-redhat-linux > Configured with: ../configure --enable-bootstrap --enable-languages=3Dc,c= ++,fortran,objc,obj-c++,ada,go,lto --prefix=3D/usr --mandir=3D/usr/share/ma= n --infodir=3D/usr/share/info --with-bugurl=3Dhttp://bugzilla.redhat.com/bu= gzilla --enable-shared --enable-threads=3Dposix --enable-checking=3Drelease= --enable-multilib --with-system-zlib --enable-__cxa_atexit --disable-libun= wind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-= gcc-major-version-only --enable-libstdcxx-backtrace --with-linker-hash-styl= e=3Dgnu --enable-plugin --enable-initfini-array --with-isl=3D/builddir/buil= d/BUILD/gcc-12.2.1-20220819/obj-aarch64-redhat-linux/isl-install --enable-g= nu-indirect-function --build=3Daarch64-redhat-linux --with-build-config=3Db= ootstrap-lto --enable-link-serialization=3D1 > Thread model: posix > Supported LTO compression algorithms: zlib zstd > gcc version 12.2.1 20220819 (Red Hat 12.2.1-1) (GCC) As the maintainer of the gcc12 port, I should probably be the one who has the answer for you. Unfortunately, as you know, I have taken maintainership only recently and I do not know gcc well enough to solve this issue yet. I suggest you to open an official bug report on https://bugs.freebsd.org/bugzilla/ to keep track of this issue. Then I woul= d encourage you to configure the two gcc versions (the one on FreeBSD and the one on Fedora) as similarly as possible (for example, you have --disable-mu= ltilib and --disable-bootstrap on FreeBSD, but --enable-multilib and --with-build-config=3Dbootstrap-lto on Fedora), then test again. If the FreeBSD version has the same configuation of the Fedora version but = still fails, then the problem might be upstream and a bug report upstream should = be opened; otherwise, it is possible that something is wrong with our port and= we should fix it. Thanks, Lorenzo Salvadore