From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 84D9D385C019; Tue, 7 Apr 2020 11:59:45 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 84D9D385C019 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1586260785; bh=Hq2c24vESxjz7tkPccryLg3dIdfqP2gAmkq9R3eGtZM=; h=From:To:Subject:Date:In-Reply-To:References:From; b=dlYXmKQALeRyrYZVUrRr6ljt0n4NIqUIvUr1RpYbiCNhQxYUGzk5b+NItm+boXpqt DsO/NhX7I8fjwPRpznmSDF0VuwToGt+4Fn0yzKSoucYPH2cWMvZ5Mo7Blr9FizZkwv NWzxJLxeNXPAo7ztJ4wEo0Fmo8UK9eVXaHUdsJ3U= From: "redi at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/94510] [9/10 Regression] nullptr_t implicitly cast to zero twice in std::array Date: Tue, 07 Apr 2020 11:59:45 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 9.3.0 X-Bugzilla-Keywords: accepts-invalid X-Bugzilla-Severity: normal X-Bugzilla-Who: redi at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 9.4 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cf_known_to_fail cf_known_to_work cf_reconfirmed_on short_desc everconfirmed target_milestone bug_status cc 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 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Apr 2020 11:59:45 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D94510 Jonathan Wakely changed: What |Removed |Added ---------------------------------------------------------------------------- Known to fail| |10.0, 9.3.0 Known to work| |8.4.0 Last reconfirmed| |2020-04-07 Summary|nullptr_t implicitly cast |[9/10 Regression] nullptr_t |to zero twice in std::array |implicitly cast to zero | |twice in std::array Ever confirmed|0 |1 Target Milestone|--- |9.4 Status|UNCONFIRMED |NEW CC| |msebor at gcc dot gnu.org --- Comment #8 from Jonathan Wakely --- (In reply to Karthik Nishanth from comment #4) > Created attachment 48221 [details] > gcc version string There's no need to create attachments for each tiny bit of text, comments a= re fine, and much easier for us to see, without having to click through a sepa= rate page. (Your attachment in comment 3 just duplicates what you already said in comment 0 anyway!) Relevant info from the comment 4 attachment: Using built-in specs. COLLECT_GCC=3Dg++ COLLECT_LTO_WRAPPER=3D/usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/lto-wrapper Target: x86_64-pc-linux-gnu Configured with: /build/gcc/src/gcc/configure --prefix=3D/usr --libdir=3D/u= sr/lib --libexecdir=3D/usr/lib --mandir=3D/usr/share/man --infodir=3D/usr/share/in= fo --with-pkgversion=3D'Arch Linux 9.3.0-1' --with-bugurl=3Dhttps://bugs.archlinux.org/ --enable-languages=3Dc,c++,ada,fortran,go,lto,objc,obj-c++,d --enable-shared --enable-threads=3Dposix --with-system-zlib --with-isl --enable-__cxa_atexit --disable-libunwind-exceptions --enable-clocale=3Dgnu --disable-libstdcxx-p= ch --disable-libssp --enable-gnu-unique-object --enable-linker-build-id --enable-lto --enable-plugin --enable-install-libiberty --with-linker-hash-style=3Dgnu --enable-gnu-indirect-function --enable-mult= ilib --disable-werror --enable-checking=3Drelease --enable-default-pie --enable-default-ssp --enable-cet=3Dauto gdc_include_dir=3D/usr/include/dla= ng/gdc Thread model: posix gcc version 9.3.0 (Arch Linux 9.3.0-1)=20 Reduced testcase: int arr[3] =3D { nullptr, 0, 0 }; This is a regression introduced by r270155 PR c++/89974 - ICE on a definition of a non-type specialization on a st= ruct object with pointer to member function PR c++/89974 - ICE on a definition of a non-type specialization on a st= ruct object with pointer to member function PR c++/89878 - same specializations on a zero-initialized struct object= as a non-type parameter treated as distinct PR c++/89833 - sorry, unimplemented: string literal in function template signature PR c++/47488 - sorry, unimplemented: string literal in function template signature gcc/cp/ChangeLog: PR c++/89974 PR c++/89878 PR c++/89833 PR c++/47488 * decl.c (reshape_init_array_1): Strip trailing zero-initialize= rs from arrays of trivial type and known size. * mangle.c (write_expression): Convert braced initializer lists to STRING_CSTs. (write_expression): Trim trailing zero-initializers from arrays of trivial type. (write_template_arg_literal): Mangle strings the same as braced initializer lists. gcc/testsuite/ChangeLog: PR c++/89974 PR c++/89878 PR c++/89833 PR c++/47488 * gcc/testsuite/g++.dg/abi/mangle69.C: New test. * gcc/testsuite/g++.dg/abi/mangle70.C: New test. * gcc/testsuite/g++.dg/abi/mangle71.C: New test. * gcc/testsuite/g++.dg/abi/mangle72.C: New test. * gcc/testsuite/g++.dg/cpp0x/constexpr-array19.C: New test. * gcc/testsuite/g++.dg/cpp2a/nontype-class15.C: New test. * gcc/testsuite/g++.dg/cpp2a/nontype-class16.C: New test. * gcc/testsuite/g++.dg/init/array51.C: New test.=