https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94510

Jonathan Wakely <redi at gcc dot gnu.org> 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 <redi at gcc dot gnu.org> ---
(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 are
fine, and much easier for us to see, without having to click through a separate
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=g++
COLLECT_LTO_WRAPPER=/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=/usr --libdir=/usr/lib
--libexecdir=/usr/lib --mandir=/usr/share/man --infodir=/usr/share/info
--with-pkgversion='Arch Linux 9.3.0-1'
--with-bugurl=https://bugs.archlinux.org/
--enable-languages=c,c++,ada,fortran,go,lto,objc,obj-c++,d --enable-shared
--enable-threads=posix --with-system-zlib --with-isl --enable-__cxa_atexit
--disable-libunwind-exceptions --enable-clocale=gnu --disable-libstdcxx-pch
--disable-libssp --enable-gnu-unique-object --enable-linker-build-id
--enable-lto --enable-plugin --enable-install-libiberty
--with-linker-hash-style=gnu --enable-gnu-indirect-function --enable-multilib
--disable-werror --enable-checking=release --enable-default-pie
--enable-default-ssp --enable-cet=auto gdc_include_dir=/usr/include/dlang/gdc
Thread model: posix
gcc version 9.3.0 (Arch Linux 9.3.0-1) 


Reduced testcase:

int arr[3] = { nullptr, 0, 0 };

This is a regression introduced by r270155

    PR c++/89974 - ICE on a definition of a non-type specialization on a struct
object with pointer to member function

    PR c++/89974 - ICE on a definition of a non-type specialization on a struct
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-initializers
            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.

Reply via email to