public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug lto/115223] New: [15 regression] ICE when building KDE kontrast with LTO (error: ‘TYPE_CANONICAL’ has different ‘TYPE_CANONICAL’)
@ 2024-05-25  2:33 sjames at gcc dot gnu.org
  2024-05-25  8:52 ` [Bug lto/115223] " sjames at gcc dot gnu.org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: sjames at gcc dot gnu.org @ 2024-05-25  2:33 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 115223
           Summary: [15 regression] ICE when building KDE kontrast with
                    LTO (error: ‘TYPE_CANONICAL’ has different
                    ‘TYPE_CANONICAL’)
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: lto
          Assignee: unassigned at gcc dot gnu.org
          Reporter: sjames at gcc dot gnu.org
  Target Milestone: ---

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

This is different from the earlier bugs the other week. I hit a bunch of these
and just picked Kontrast at random.

```
# g++ -c -std=gnu++20 -flto kontrast.cpp.ii
In file included from
/var/tmp/portage/app-accessibility/kontrast-23.08.5/work/kontrast-23.08.5/src/kontrast.cpp:361:
/var/tmp/portage/app-accessibility/kontrast-23.08.5/work/kontrast-23.08.5_build/src/kontrast_autogen/include/moc_kontrast.cpp:356:27:
error: ‘TYPE_CANONICAL’ has different ‘TYPE_CANONICAL’
  356 | QT_WARNING_POP
      |                           ^
 <function_type 0xffff75afe000
    type <void_type 0xffff8084ff18 void type_6 VOID
        align:8 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type
0xffff8084ff18
        pointer_to_this <pointer_type 0xffff80857000>>
    SI
    size <integer_cst 0xffff80846438 type <integer_type 0xffff8084f0a8
bitsizetype> constant 32>
    unit-size <integer_cst 0xffff80846450 type <integer_type 0xffff8084f000
sizetype> constant 4>
    align:32 warn_if_not_align:0 symtab:0 alias-set -1 structural-equality
    arg-types <tree_list 0xffff75af3aa0
        value <reference_type 0xffff72de99d8 type <record_type 0xffff72de77e0
QVariant>
            unsigned DI
            size <integer_cst 0xffff808461f8 constant 64>
            unit-size <integer_cst 0xffff80846210 constant 8>
            align:64 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type
0xffff76cb8930>
        chain <tree_list 0xffff80838988 value <void_type 0xffff8084ff18 void>>>
    pointer_to_this <pointer_type 0xffff75afe0a8>>
 <function_type 0xffff73ab73f0
    type <void_type 0xffff7f128690 type type_6 VOID
        align:8 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type
0xffff8084ff18>
    SI
    size <integer_cst 0xffff80846438 type <integer_type 0xffff8084f0a8
bitsizetype> constant 32>
    unit-size <integer_cst 0xffff80846450 type <integer_type 0xffff8084f000
sizetype> constant 4>
    align:32 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type
0xffff75afe000
    arg-types <tree_list 0xffff75af3aa0
        value <reference_type 0xffff72de99d8 type <record_type 0xffff72de77e0
QVariant>
            unsigned DI
            size <integer_cst 0xffff808461f8 constant 64>
            unit-size <integer_cst 0xffff80846210 constant 8>
            align:64 warn_if_not_align:0 symtab:0 alias-set -1 canonical-type
0xffff76cb8930>
        chain <tree_list 0xffff80838988 value <void_type 0xffff8084ff18 void>>>
    pointer_to_this <pointer_type 0xffff73ab7498>>
during IPA pass: *free_lang_data
/var/tmp/portage/app-accessibility/kontrast-23.08.5/work/kontrast-23.08.5_build/src/kontrast_autogen/include/moc_kontrast.cpp:356:27:
internal compiler error: ‘verify_type’ failed
0xaaaacbae3247 verify_type(tree_node const*)
        /usr/src/debug/sys-devel/gcc-15.0.9999/gcc-15.0.9999/gcc/tree.cc:14434
0xaaaaccbd4523 free_lang_data
       
/usr/src/debug/sys-devel/gcc-15.0.9999/gcc-15.0.9999/gcc/ipa-free-lang-data.cc:1134
0xaaaaccbd4523 execute
       
/usr/src/debug/sys-devel/gcc-15.0.9999/gcc-15.0.9999/gcc/ipa-free-lang-data.cc:1176
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.
```

```
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/aarch64-unknown-linux-gnu/15/lto-wrapper
Target: aarch64-unknown-linux-gnu
Configured with:
/var/tmp/portage/sys-devel/gcc-15.0.9999/work/gcc-15.0.9999/configure
--host=aarch64-unknown-linux-gnu --build=aarch64-unknown-linux-gnu
--prefix=/usr --bindir=/usr/aarch64-unknown-linux-gnu/gcc-bin/15
--includedir=/usr/lib/gcc/aarch64-unknown-linux-gnu/15/include
--datadir=/usr/share/gcc-data/aarch64-unknown-linux-gnu/15
--mandir=/usr/share/gcc-data/aarch64-unknown-linux-gnu/15/man
--infodir=/usr/share/gcc-data/aarch64-unknown-linux-gnu/15/info
--with-gxx-include-dir=/usr/lib/gcc/aarch64-unknown-linux-gnu/15/include/g++-v15
--disable-silent-rules --disable-dependency-tracking
--with-python-dir=/share/gcc-data/aarch64-unknown-linux-gnu/15/python
--enable-languages=c,c++,fortran --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
15.0.9999 p, commit bc7d81fe2f725b4043ce8b9ffb11d80032ce3f75'
--with-gcc-major-version-only --enable-libstdcxx-time --enable-lto
--disable-libstdcxx-pch --enable-shared --enable-threads=posix
--enable-__cxa_atexit --enable-clocale=gnu --disable-multilib
--disable-fixed-point --enable-libgomp --disable-libssp --disable-libada
--disable-standard-branch-protection --disable-systemtap
--disable-valgrind-annotations --disable-vtable-verify --disable-libvtv
--with-zstd --without-isl --enable-default-pie --enable-host-pie
--enable-host-bind-now --enable-default-ssp --disable-fixincludes
--with-build-config=bootstrap-O3
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 15.0.0 20240523 (experimental)
ed63cd2aa5b114565fe5499c3a6bf8da5e8e48ba (Gentoo Hardened 15.0.9999 p, commit
bc7d81fe2f725b4043ce8b9ffb11d80032ce3f75)
```

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

* [Bug lto/115223] [15 regression] ICE when building KDE kontrast with LTO (error: ‘TYPE_CANONICAL’ has different ‘TYPE_CANONICAL’)
  2024-05-25  2:33 [Bug lto/115223] New: [15 regression] ICE when building KDE kontrast with LTO (error: ‘TYPE_CANONICAL’ has different ‘TYPE_CANONICAL’) sjames at gcc dot gnu.org
@ 2024-05-25  8:52 ` sjames at gcc dot gnu.org
  2024-05-25 13:58 ` [Bug c++/115223] [15 regression] ICE when building KDE kontrast with LTO (error: ‘TYPE_CANONICAL’ has different ‘TYPE_CANONICAL’) since r15-779-g3c98d06a9016a0 sjames at gcc dot gnu.org
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: sjames at gcc dot gnu.org @ 2024-05-25  8:52 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from Sam James <sjames at gcc dot gnu.org> ---
Reduced:
```
using type = void;
template <typename T> void checkSwap(T &t) noexcept(noexcept(t));
void qSwap(int value1) noexcept(noexcept(checkSwap(value1)));
type callDestructorIfNecessary(int &) noexcept {}
```

As usual, my C++ is lacking, so it might be possible to tidy this up.

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

* [Bug c++/115223] [15 regression] ICE when building KDE kontrast with LTO (error: ‘TYPE_CANONICAL’ has different ‘TYPE_CANONICAL’) since r15-779-g3c98d06a9016a0
  2024-05-25  2:33 [Bug lto/115223] New: [15 regression] ICE when building KDE kontrast with LTO (error: ‘TYPE_CANONICAL’ has different ‘TYPE_CANONICAL’) sjames at gcc dot gnu.org
  2024-05-25  8:52 ` [Bug lto/115223] " sjames at gcc dot gnu.org
@ 2024-05-25 13:58 ` sjames at gcc dot gnu.org
  2024-05-27  6:57 ` rguenth at gcc dot gnu.org
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: sjames at gcc dot gnu.org @ 2024-05-25 13:58 UTC (permalink / raw)
  To: gcc-bugs

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

Sam James <sjames at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|[15 regression] ICE when    |[15 regression] ICE when
                   |building KDE kontrast with  |building KDE kontrast with
                   |LTO (error:                 |LTO (error:
                   |‘TYPE_CANONICAL’ has        |‘TYPE_CANONICAL’ has
                   |different ‘TYPE_CANONICAL’) |different ‘TYPE_CANONICAL’)
                   |                            |since
                   |                            |r15-779-g3c98d06a9016a0
                 CC|                            |jason at gcc dot gnu.org,
                   |                            |ppalka at gcc dot gnu.org
          Component|lto                         |c++

--- Comment #2 from Sam James <sjames at gcc dot gnu.org> ---
r15-779-g3c98d06a9016a0

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

* [Bug c++/115223] [15 regression] ICE when building KDE kontrast with LTO (error: ‘TYPE_CANONICAL’ has different ‘TYPE_CANONICAL’) since r15-779-g3c98d06a9016a0
  2024-05-25  2:33 [Bug lto/115223] New: [15 regression] ICE when building KDE kontrast with LTO (error: ‘TYPE_CANONICAL’ has different ‘TYPE_CANONICAL’) sjames at gcc dot gnu.org
  2024-05-25  8:52 ` [Bug lto/115223] " sjames at gcc dot gnu.org
  2024-05-25 13:58 ` [Bug c++/115223] [15 regression] ICE when building KDE kontrast with LTO (error: ‘TYPE_CANONICAL’ has different ‘TYPE_CANONICAL’) since r15-779-g3c98d06a9016a0 sjames at gcc dot gnu.org
@ 2024-05-27  6:57 ` rguenth at gcc dot gnu.org
  2024-05-29  8:50 ` cvs-commit at gcc dot gnu.org
  2024-05-29  8:51 ` ppalka at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: rguenth at gcc dot gnu.org @ 2024-05-27  6:57 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Version|unknown                     |15.0
           Keywords|                            |ice-on-valid-code
   Target Milestone|---                         |15.0

--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
Note -flto is only required because that triggers type verification.

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

* [Bug c++/115223] [15 regression] ICE when building KDE kontrast with LTO (error: ‘TYPE_CANONICAL’ has different ‘TYPE_CANONICAL’) since r15-779-g3c98d06a9016a0
  2024-05-25  2:33 [Bug lto/115223] New: [15 regression] ICE when building KDE kontrast with LTO (error: ‘TYPE_CANONICAL’ has different ‘TYPE_CANONICAL’) sjames at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2024-05-27  6:57 ` rguenth at gcc dot gnu.org
@ 2024-05-29  8:50 ` cvs-commit at gcc dot gnu.org
  2024-05-29  8:51 ` ppalka at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2024-05-29  8:50 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 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:58b8c87b7fb281e35a6817cc91a292096fdc02dc

commit r15-892-g58b8c87b7fb281e35a6817cc91a292096fdc02dc
Author: Patrick Palka <ppalka@redhat.com>
Date:   Wed May 29 04:49:37 2024 -0400

    c++: canonicity of fn types w/ instantiated eh specs [PR115223]

    When propagating structural equality in build_cp_fntype_variant, we
    should consider structural equality of the exception-less variant, not
    of the given type which might use structural equality only because it
    has a (complex) noexcept-spec that we're intending to replace, as in
    maybe_instantiate_noexcept which calls build_exception_variant using
    the deferred-noexcept function type.  Otherwise we might pessimistically
    use structural equality for a function type with a simple instantiated
    noexcept-spec, leading to a LTO-triggered type verification failure if we
    later use that (structural-equality) type as the canonical version of
    some other variant.

            PR c++/115223

    gcc/cp/ChangeLog:

            * tree.cc (build_cp_fntype_variant): Propagate structural
            equality of the exception-less variant.

    gcc/testsuite/ChangeLog:

            * g++.dg/cpp0x/noexcept87.C: New test.

    Reviewed-by: Jason Merrill <jason@redhat.com>

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

* [Bug c++/115223] [15 regression] ICE when building KDE kontrast with LTO (error: ‘TYPE_CANONICAL’ has different ‘TYPE_CANONICAL’) since r15-779-g3c98d06a9016a0
  2024-05-25  2:33 [Bug lto/115223] New: [15 regression] ICE when building KDE kontrast with LTO (error: ‘TYPE_CANONICAL’ has different ‘TYPE_CANONICAL’) sjames at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2024-05-29  8:50 ` cvs-commit at gcc dot gnu.org
@ 2024-05-29  8:51 ` ppalka at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: ppalka at gcc dot gnu.org @ 2024-05-29  8:51 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
             Status|UNCONFIRMED                 |RESOLVED
           Assignee|unassigned at gcc dot gnu.org      |ppalka at gcc dot gnu.org

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

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

end of thread, other threads:[~2024-05-29  8:51 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-05-25  2:33 [Bug lto/115223] New: [15 regression] ICE when building KDE kontrast with LTO (error: ‘TYPE_CANONICAL’ has different ‘TYPE_CANONICAL’) sjames at gcc dot gnu.org
2024-05-25  8:52 ` [Bug lto/115223] " sjames at gcc dot gnu.org
2024-05-25 13:58 ` [Bug c++/115223] [15 regression] ICE when building KDE kontrast with LTO (error: ‘TYPE_CANONICAL’ has different ‘TYPE_CANONICAL’) since r15-779-g3c98d06a9016a0 sjames at gcc dot gnu.org
2024-05-27  6:57 ` rguenth at gcc dot gnu.org
2024-05-29  8:50 ` cvs-commit at gcc dot gnu.org
2024-05-29  8:51 ` 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).