public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/113644] New: [14 regression] ICE when building libcxxabi-16.0.6
@ 2024-01-28 18:21 sjames at gcc dot gnu.org
  2024-01-28 19:57 ` [Bug c++/113644] " pinskia at gcc dot gnu.org
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: sjames at gcc dot gnu.org @ 2024-01-28 18:21 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 113644
           Summary: [14 regression] ICE when building libcxxabi-16.0.6
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: sjames at gcc dot gnu.org
  Target Milestone: ---

Created attachment 57246
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=57246&action=edit
cxa_demangle.cpp.ii.xz

Originally reported downstream in Gentoo at https://bugs.gentoo.org/923111 by
Toralf Förster.

```
FAILED: libcxxabi/src/CMakeFiles/cxxabi_static_objects.dir/cxa_demangle.cpp.o
/usr/lib/ccache/bin/g++ -m32 -mfpmath=sse -DLIBCXX_BUILDING_LIBCXXABI
-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LIBCPP_BUILDING_LIBRARY
-D_LIBCXXABI_BUILDING_LIBRARY -D__STDC_CONSTANT_MACROS -D__STDC_FORM
AT_MACROS -D__STDC_LIMIT_MACROS
-I/var/tmp/portage/sys-libs/libcxxabi-16.0.6/work/libcxxabi/../libcxx/src
-I/var/tmp/portage/sys-libs/libcxxabi-16.0.6/work/runtimes_build-abi_x86_32.x86/include/c++/v1
-I/var/
tmp/portage/sys-libs/libcxxabi-16.0.6/work/libcxxabi/include  -O3 -march=znver3
-fvisibility-inlines-hidden -Werror=date-time -Wall -Wextra
-Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wno-missing-field
-initializers -Wimplicit-fallthrough -Wno-class-memaccess -Wno-redundant-move
-Wno-pessimizing-move -Wno-noexcept-type -Wdelete-non-virtual-dtor
-Wsuggest-override -Wno-comment -Wno-misleading-indentation -Wc
tad-maybe-unsupported -fdiagnostics-color -fdata-sections  -std=c++20
-fdiagnostics-color=always -nostdinc++ -Werror=return-type -W -Wall
-Wchar-subscripts -Wconversion -Wmismatched-tags -Wmissing-braces -Wun
used-function -Wshadow -Wsign-compare -Wsign-conversion -Wstrict-aliasing=2
-Wstrict-overflow=4 -Wunused-parameter -Wunused-variable -Wwrite-strings
-Wundef -Wno-suggest-override -Wno-error -pedantic -fstrict
-aliasing -D_DEBUG -MD -MT
libcxxabi/src/CMakeFiles/cxxabi_static_objects.dir/cxa_demangle.cpp.o -MF
libcxxabi/src/CMakeFiles/cxxabi_static_objects.dir/cxa_demangle.cpp.o.d -o
libcxxabi/src/CMakeFiles/cxxabi_
static_objects.dir/cxa_demangle.cpp.o -c
/var/tmp/portage/sys-libs/libcxxabi-16.0.6/work/libcxxabi/src/cxa_demangle.cpp
/var/tmp/portage/sys-libs/libcxxabi-16.0.6/work/libcxxabi/src/cxa_demangle.cpp:407:1:
internal compiler error: in comptypes, at cp/typeck.cc:1681
  407 | }  // __cxxabiv1
      | ^
0x559308a2e393 comptypes(tree_node*, tree_node*, int)
       
/usr/src/debug/sys-devel/gcc-14.0.1.9999/gcc-14.0.1.9999/gcc/cp/typeck.cc:1681
0x55930a7f6476 unify
       
/usr/src/debug/sys-devel/gcc-14.0.1.9999/gcc-14.0.1.9999/gcc/cp/pt.cc:24956
0x55930a7f60ad unify
       
/usr/src/debug/sys-devel/gcc-14.0.1.9999/gcc-14.0.1.9999/gcc/cp/pt.cc:25009
0x55930a7f4ed6 get_partial_spec_bindings
       
/usr/src/debug/sys-devel/gcc-14.0.1.9999/gcc-14.0.1.9999/gcc/cp/pt.cc:25893
0x55930a8755f0 most_specialized_partial_spec(tree_node*, int, bool)
       
/usr/src/debug/sys-devel/gcc-14.0.1.9999/gcc-14.0.1.9999/gcc/cp/pt.cc:26190
0x5593098ca8f3 specialization_of
       
/usr/src/debug/sys-devel/gcc-14.0.1.9999/gcc-14.0.1.9999/gcc/cp/parser.cc:34994
0x5593098ca8f3 class_decl_loc_t::diag_mismatched_tags(tree_node*)
       
/usr/src/debug/sys-devel/gcc-14.0.1.9999/gcc-14.0.1.9999/gcc/cp/parser.cc:35178
0x559308abbd61 class_decl_loc_t::diag_mismatched_tags()
       
/usr/src/debug/sys-devel/gcc-14.0.1.9999/gcc-14.0.1.9999/gcc/cp/parser.cc:35320
0x55930ac85c1c c_parse_file()
       
/usr/src/debug/sys-devel/gcc-14.0.1.9999/gcc-14.0.1.9999/gcc/cp/parser.cc:51175
0x55930ac564e3 c_common_parse_file()
       
/usr/src/debug/sys-devel/gcc-14.0.1.9999/gcc-14.0.1.9999/gcc/c-family/c-opts.cc:1301
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.
See <https://bugs.gentoo.org/> for instructions.
```

```
$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-pc-linux-gnu/14/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with:
/var/tmp/portage/sys-devel/gcc-14.0.1.9999/work/gcc-14.0.1.9999/configure
--host=x86_64-pc-linux-gnu --build=x86_64-pc-linux-gnu --prefix=/usr
--bindir=/usr/x86_64-pc-linux-gnu/gcc-bin/14
--includedir=/usr/lib/gcc/x86_64-pc-linux-gnu/14/include
--datadir=/usr/share/gcc-data/x86_64-pc-linux-gnu/14
--mandir=/usr/share/gcc-data/x86_64-pc-linux-gnu/14/man
--infodir=/usr/share/gcc-data/x86_64-pc-linux-gnu/14/info
--with-gxx-include-dir=/usr/lib/gcc/x86_64-pc-linux-gnu/14/include/g++-v14
--disable-silent-rules --disable-dependency-tracking
--with-python-dir=/share/gcc-data/x86_64-pc-linux-gnu/14/python
--enable-languages=c,c++,fortran,rust --enable-obsolete --enable-secureplt
--disable-werror --with-system-zlib --enable-nls --without-included-gettext
--disable-libunwind-exceptions --enable-checking=yes,extra,rtl
--with-bugurl=https://bugs.gentoo.org/ --with-pkgversion='Gentoo Hardened
14.0.1 p, commit ddeac849ac4c3fecdf591ab6fb075cc6c5afdbff'
--with-gcc-major-version-only --enable-libstdcxx-time --enable-lto
--disable-libstdcxx-pch --enable-shared --enable-threads=posix
--enable-__cxa_atexit --enable-clocale=gnu --enable-multilib
--with-multilib-list=m32,m64 --disable-fixed-point --enable-targets=all
--enable-libgomp --disable-libssp --disable-libada --enable-cet
--disable-systemtap --enable-valgrind-annotations --disable-vtable-verify
--disable-libvtv --with-zstd --with-isl --disable-isl-version-check
--enable-default-pie --enable-host-pie --enable-host-bind-now
--enable-default-ssp --with-build-config='bootstrap-O3 bootstrap-lto
bootstrap-cet'
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 14.0.1 20240127 (experimental)
ce61de1b8a1bb3a22118e900376f380768f2ba59 (Gentoo Hardened 14.0.1 p, commit
ddeac849ac4c3fecdf591ab6fb075cc6c5afdbff)
```

I can reproduce with just 'g++ cxa_demangle.cpp.ii -c -m32 -std=c++20
-Wmismatched-tags'.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug c++/113644] [14 regression] ICE when building libcxxabi-16.0.6
  2024-01-28 18:21 [Bug c++/113644] New: [14 regression] ICE when building libcxxabi-16.0.6 sjames at gcc dot gnu.org
@ 2024-01-28 19:57 ` pinskia at gcc dot gnu.org
  2024-01-28 19:58 ` pinskia at gcc dot gnu.org
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-01-28 19:57 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Reduced:
```
template <class _Tp> struct __has_storage_type {};
template <class _Cp, bool = __has_storage_type<_Cp>::value>
class __bit_reference {};
template <class _Cp> class __bit_reference<_Cp, false> {
  friend class __bit_reference<_Cp>;
};

```

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug c++/113644] [14 regression] ICE when building libcxxabi-16.0.6
  2024-01-28 18:21 [Bug c++/113644] New: [14 regression] ICE when building libcxxabi-16.0.6 sjames at gcc dot gnu.org
  2024-01-28 19:57 ` [Bug c++/113644] " pinskia at gcc dot gnu.org
@ 2024-01-28 19:58 ` pinskia at gcc dot gnu.org
  2024-01-28 19:59 ` pinskia at gcc dot gnu.org
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-01-28 19:58 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2024-01-28
     Ever confirmed|0                           |1

--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
I almost want to say the underlying issue with this one is the same as PR
106052 .

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug c++/113644] [14 regression] ICE when building libcxxabi-16.0.6
  2024-01-28 18:21 [Bug c++/113644] New: [14 regression] ICE when building libcxxabi-16.0.6 sjames at gcc dot gnu.org
  2024-01-28 19:57 ` [Bug c++/113644] " pinskia at gcc dot gnu.org
  2024-01-28 19:58 ` pinskia at gcc dot gnu.org
@ 2024-01-28 19:59 ` pinskia at gcc dot gnu.org
  2024-01-28 20:59 ` [Bug c++/113644] [14 regression] ICE when building libcxxabi-16.0.6 since r14-6520 jakub at gcc dot gnu.org
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu.org @ 2024-01-28 19:59 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |needs-bisection
   Target Milestone|---                         |14.0

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug c++/113644] [14 regression] ICE when building libcxxabi-16.0.6 since r14-6520
  2024-01-28 18:21 [Bug c++/113644] New: [14 regression] ICE when building libcxxabi-16.0.6 sjames at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2024-01-28 19:59 ` pinskia at gcc dot gnu.org
@ 2024-01-28 20:59 ` jakub at gcc dot gnu.org
  2024-01-28 21:17 ` sjames at gcc dot gnu.org
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: jakub at gcc dot gnu.org @ 2024-01-28 20:59 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|needs-bisection             |
            Summary|[14 regression] ICE when    |[14 regression] ICE when
                   |building libcxxabi-16.0.6   |building libcxxabi-16.0.6
                   |                            |since r14-6520
                 CC|                            |jakub at gcc dot gnu.org,
                   |                            |ppalka at gcc dot gnu.org

--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Started with r14-6520-g35ba3add7d0a9fc6ce955ba8ad82b0413e86ad7d

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug c++/113644] [14 regression] ICE when building libcxxabi-16.0.6 since r14-6520
  2024-01-28 18:21 [Bug c++/113644] New: [14 regression] ICE when building libcxxabi-16.0.6 sjames at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2024-01-28 20:59 ` [Bug c++/113644] [14 regression] ICE when building libcxxabi-16.0.6 since r14-6520 jakub at gcc dot gnu.org
@ 2024-01-28 21:17 ` sjames at gcc dot gnu.org
  2024-01-29  8:26 ` rguenth at gcc dot gnu.org
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: sjames at gcc dot gnu.org @ 2024-01-28 21:17 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from Sam James <sjames at gcc dot gnu.org> ---
cvise gave me:
```
template <class _Cp, bool = _Cp ::value> class __bit_reference;
template <class _Cp> struct __bit_reference<_Cp, false> {
  class __bit_reference<_Cp>;
};
```

gcc doesn't warn on it, but clang does

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug c++/113644] [14 regression] ICE when building libcxxabi-16.0.6 since r14-6520
  2024-01-28 18:21 [Bug c++/113644] New: [14 regression] ICE when building libcxxabi-16.0.6 sjames at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2024-01-28 21:17 ` sjames at gcc dot gnu.org
@ 2024-01-29  8:26 ` rguenth at gcc dot gnu.org
  2024-01-29 14:40 ` ppalka at gcc dot gnu.org
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: rguenth at gcc dot gnu.org @ 2024-01-29  8:26 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P1

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug c++/113644] [14 regression] ICE when building libcxxabi-16.0.6 since r14-6520
  2024-01-28 18:21 [Bug c++/113644] New: [14 regression] ICE when building libcxxabi-16.0.6 sjames at gcc dot gnu.org
                   ` (5 preceding siblings ...)
  2024-01-29  8:26 ` rguenth at gcc dot gnu.org
@ 2024-01-29 14:40 ` ppalka at gcc dot gnu.org
  2024-01-30 15:14 ` cvs-commit at gcc dot gnu.org
  2024-01-30 15:15 ` ppalka at gcc dot gnu.org
  8 siblings, 0 replies; 10+ messages in thread
From: ppalka at gcc dot gnu.org @ 2024-01-29 14:40 UTC (permalink / raw)
  To: gcc-bugs

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

Patrick Palka <ppalka at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Assignee|unassigned at gcc dot gnu.org      |ppalka at gcc dot gnu.org
             Status|NEW                         |ASSIGNED

--- Comment #5 from Patrick Palka <ppalka at gcc dot gnu.org> ---
non-diagnostic ICE-on-invalid testcase:

template<int> struct A { };

struct B { static const int value = 42; };

template<class T> void f(A<42>);
template<class T> void f(A<T::value>);

int main() {
  f<B>(A<42>{});
}

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug c++/113644] [14 regression] ICE when building libcxxabi-16.0.6 since r14-6520
  2024-01-28 18:21 [Bug c++/113644] New: [14 regression] ICE when building libcxxabi-16.0.6 sjames at gcc dot gnu.org
                   ` (6 preceding siblings ...)
  2024-01-29 14:40 ` ppalka at gcc dot gnu.org
@ 2024-01-30 15:14 ` cvs-commit at gcc dot gnu.org
  2024-01-30 15:15 ` ppalka at gcc dot gnu.org
  8 siblings, 0 replies; 10+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2024-01-30 15:14 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from GCC Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Patrick Palka <ppalka@gcc.gnu.org>:

https://gcc.gnu.org/g:af37bef86199e50368cbfbc97befe0622a07f12f

commit r14-8630-gaf37bef86199e50368cbfbc97befe0622a07f12f
Author: Patrick Palka <ppalka@redhat.com>
Date:   Tue Jan 30 10:13:41 2024 -0500

    c++: unifying integer parm with type-dep arg [PR113644]

    Here when trying to unify P=42 A=T::value we ICE due to the latter's
    empty type, which same_type_p dislikes.

            PR c++/113644

    gcc/cp/ChangeLog:

            * pt.cc (unify) <case INTEGER_CST>: Handle NULL_TREE type.

    gcc/testsuite/ChangeLog:

            * g++.dg/template/nontype30.C: New test.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [Bug c++/113644] [14 regression] ICE when building libcxxabi-16.0.6 since r14-6520
  2024-01-28 18:21 [Bug c++/113644] New: [14 regression] ICE when building libcxxabi-16.0.6 sjames at gcc dot gnu.org
                   ` (7 preceding siblings ...)
  2024-01-30 15:14 ` cvs-commit at gcc dot gnu.org
@ 2024-01-30 15:15 ` ppalka at gcc dot gnu.org
  8 siblings, 0 replies; 10+ messages in thread
From: ppalka at gcc dot gnu.org @ 2024-01-30 15:15 UTC (permalink / raw)
  To: gcc-bugs

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

Patrick Palka <ppalka at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
             Status|ASSIGNED                    |RESOLVED

--- Comment #7 from Patrick Palka <ppalka at gcc dot gnu.org> ---
Fixed.

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2024-01-30 15:15 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-28 18:21 [Bug c++/113644] New: [14 regression] ICE when building libcxxabi-16.0.6 sjames at gcc dot gnu.org
2024-01-28 19:57 ` [Bug c++/113644] " pinskia at gcc dot gnu.org
2024-01-28 19:58 ` pinskia at gcc dot gnu.org
2024-01-28 19:59 ` pinskia at gcc dot gnu.org
2024-01-28 20:59 ` [Bug c++/113644] [14 regression] ICE when building libcxxabi-16.0.6 since r14-6520 jakub at gcc dot gnu.org
2024-01-28 21:17 ` sjames at gcc dot gnu.org
2024-01-29  8:26 ` rguenth at gcc dot gnu.org
2024-01-29 14:40 ` ppalka at gcc dot gnu.org
2024-01-30 15:14 ` cvs-commit at gcc dot gnu.org
2024-01-30 15:15 ` ppalka at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).