public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/112515] New: [14 regression] ICE when building Transmission in standard_conversion
@ 2023-11-13 17:51 sjames at gcc dot gnu.org
  2023-11-13 17:58 ` [Bug c++/112515] " pinskia at gcc dot gnu.org
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: sjames at gcc dot gnu.org @ 2023-11-13 17:51 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 112515
           Summary: [14 regression] ICE when building Transmission in
                    standard_conversion
           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 56571
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=56571&action=edit
Session.cc.ii

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

```
FAILED: gtk/CMakeFiles/transmission-gtk.dir/Session.cc.o
/usr/lib/ccache/bin/x86_64-pc-linux-gnu-g++ -DFMT_EXCEPTIONS=0
-DFMT_HEADER_ONLY=1 -DGETTEXT_PACKAGE=\"transmission-gtk\" -DHAVE_GETTEXT
-DHAVE_NGETTEXT -DTRANSMISSIONLOCALEDIR=\"/usr/share/locale\" -DWITH_UT
P
-I/var/tmp/portage/net-p2p/transmission-4.0.4/work/transmission-4.0.4_build/gtk
-I/var/tmp/portage/net-p2p/transmission-4.0.4/work/transmission-4.0.4/libtransmission/..
-I/var/tmp/portage/net-p2p/transmissi
on-4.0.4/work/transmission-4.0.4_build/libtransmission/.. -isystem
/var/tmp/portage/net-p2p/transmission-4.0.4/work/transmission-4.0.4/cmake/../third-party/fmt/include
-isystem /usr/include/gtkmm-4.0 -isystem
 /usr/lib64/gtkmm-4.0/include -isystem /usr/include/pango-1.0 -isystem
/usr/include/cairo -isystem /usr/include/graphene-1.0 -isystem
/usr/lib64/graphene-1.0/include -isystem /usr/include/pangomm-2.48 -isyste
m /usr/lib64/pangomm-2.48/include -isystem /usr/include/cairomm-1.16 -isystem
/usr/lib64/cairomm-1.16/include -isystem /usr/include/gdk-pixbuf-2.0 -isystem
/usr/include/gtk-4.0/unix-print -isystem /usr/includ
e/gtk-4.0 -isystem /usr/include/sigc++-3.0 -isystem
/usr/lib64/sigc++-3.0/include -isystem /usr/include/giomm-2.68 -isystem
/usr/lib64/giomm-2.68/include -isystem /usr/include/glibmm-2.68 -isystem
/usr/lib64/
glibmm-2.68/include -isystem /usr/include/freetype2 -isystem
/usr/include/harfbuzz -isystem /usr/include/glib-2.0 -isystem
/usr/lib64/glib-2.0/include -isystem /usr/include/libpng16 -isystem
/usr/include/pixm
an-1 -isystem /usr/include/fribidi -isystem /usr/lib64/libffi/include -isystem
/usr/include/libmount -isystem /usr/include/blkid  -DNDEBUG -O3 -march=native
-pipe -Wa,-O2 -Wa,-mtune=znver2 -fcf-protection=non
e -fdiagnostics-color=always -fdiagnostics-urls=never -frecord-gcc-switches   
-ggdb3 -std=gnu++17 -fdiagnostics-color=always -W -Wall -Wextra -Wcast-align
-Wduplicated-cond -Wextra-semi -Wfloat-equal -Winit-
self -Wint-in-bool-context -Wlogical-op -Wmissing-format-attribute
-Wnull-dereference -Wpointer-arith -Wredundant-decls -Wredundant-move
-Wrestrict -Wself-move -Wshadow -Wsign-compare -Wsuggest-override -Wuni
nitialized -Wunreachable-code -Wunused -Wunused-const-variable
-Wunused-parameter -Wunused-result -Wwrite-strings -Wformat-security
-Wno-exit-time-destructors -mfpmath=sse -msse -msse2 -pthread -MD -MT gtk/CM
akeFiles/transmission-gtk.dir/Session.cc.o -MF
gtk/CMakeFiles/transmission-gtk.dir/Session.cc.o.d -o
gtk/CMakeFiles/transmission-gtk.dir/Session.cc.o -c
/var/tmp/portage/net-p2p/transmission-4.0.4/work/transm
ission-4.0.4/gtk/Session.cc
In file included from
/var/tmp/portage/net-p2p/transmission-4.0.4/work/transmission-4.0.4/gtk/SortListModel.hh:8,
                 from
/var/tmp/portage/net-p2p/transmission-4.0.4/work/transmission-4.0.4/gtk/Session.cc:12:
/var/tmp/portage/net-p2p/transmission-4.0.4/work/transmission-4.0.4/gtk/SorterBase.hh:
In member function ‘Gtk::Ordering SorterBase<T>::compare_vfunc(gpointer,
gpointer)’:
/var/tmp/portage/net-p2p/transmission-4.0.4/work/transmission-4.0.4/gtk/SorterBase.hh:26:65:
internal compiler error: Segmentation fault
   26 |     return Gtk::Ordering{ compare(*concrete_lhs, *concrete_rhs) };
      |                                                                 ^
0x563234b1284c crash_signal
       
/usr/src/debug/sys-devel/gcc-14.0.0_pre20231112/gcc-14-20231112/gcc/toplev.cc:316
0x56323555805c standard_conversion
       
/usr/src/debug/sys-devel/gcc-14.0.0_pre20231112/gcc-14-20231112/gcc/cp/call.cc:1230
0x563235557580 implicit_conversion
       
/usr/src/debug/sys-devel/gcc-14.0.0_pre20231112/gcc-14-20231112/gcc/cp/call.cc:2081
0x563235d53958 can_convert_arg(tree_node*, tree_node*, tree_node*, int, int)
       
/usr/src/debug/sys-devel/gcc-14.0.0_pre20231112/gcc-14-20231112/gcc/cp/call.cc:13263
0x563233c6daa3 is_direct_enum_init(tree_node*, tree_node*)
       
/usr/src/debug/sys-devel/gcc-14.0.0_pre20231112/gcc-14-20231112/gcc/cp/decl.cc:6617
0x563233c6daa3 convert_for_assignment
       
/usr/src/debug/sys-devel/gcc-14.0.0_pre20231112/gcc-14-20231112/gcc/cp/typeck.cc:10135
0x56323554cefa check_return_expr(tree_node*, bool*, bool*)
       
/usr/src/debug/sys-devel/gcc-14.0.0_pre20231112/gcc-14-20231112/gcc/cp/typeck.cc:11235
0x56323554b7d8 finish_return_stmt(tree_node*)
       
/usr/src/debug/sys-devel/gcc-14.0.0_pre20231112/gcc-14-20231112/gcc/cp/semantics.cc:1276
0x563235535555 cp_parser_jump_statement
       
/usr/src/debug/sys-devel/gcc-14.0.0_pre20231112/gcc-14-20231112/gcc/cp/parser.cc:14676
0x563235535555 cp_parser_statement
       
/usr/src/debug/sys-devel/gcc-14.0.0_pre20231112/gcc-14-20231112/gcc/cp/parser.cc:12532
0x5632355317e5 cp_parser_statement_seq_opt
       
/usr/src/debug/sys-devel/gcc-14.0.0_pre20231112/gcc-14-20231112/gcc/cp/parser.cc:13210
0x5632355317e5 cp_parser_compound_statement
       
/usr/src/debug/sys-devel/gcc-14.0.0_pre20231112/gcc-14-20231112/gcc/cp/parser.cc:13064
0x56323552dbd9 cp_parser_function_body
       
/usr/src/debug/sys-devel/gcc-14.0.0_pre20231112/gcc-14-20231112/gcc/cp/parser.cc:25589
0x56323552dbd9 cp_parser_ctor_initializer_opt_and_function_body
       
/usr/src/debug/sys-devel/gcc-14.0.0_pre20231112/gcc-14-20231112/gcc/cp/parser.cc:25640
0x56323552dbd9 cp_parser_function_definition_after_declarator
0x56323552dbd9 cp_parser_function_definition_after_declarator
       
/usr/src/debug/sys-devel/gcc-14.0.0_pre20231112/gcc-14-20231112/gcc/cp/parser.cc:32307
0x56323549e275 cp_parser_function_definition_from_specifiers_and_declarator
       
/usr/src/debug/sys-devel/gcc-14.0.0_pre20231112/gcc-14-20231112/gcc/cp/parser.cc:32224
0x56323549e275 cp_parser_init_declarator
       
/usr/src/debug/sys-devel/gcc-14.0.0_pre20231112/gcc-14-20231112/gcc/cp/parser.cc:23050
0x56323572887f cp_parser_single_declaration
       
/usr/src/debug/sys-devel/gcc-14.0.0_pre20231112/gcc-14-20231112/gcc/cp/parser.cc:32824
0x5632357266a9 cp_parser_template_declaration_after_parameters
       
/usr/src/debug/sys-devel/gcc-14.0.0_pre20231112/gcc-14-20231112/gcc/cp/parser.cc:32377
0x56323554a499 cp_parser_explicit_template_declaration
       
/usr/src/debug/sys-devel/gcc-14.0.0_pre20231112/gcc-14-20231112/gcc/cp/parser.cc:32650
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/x86_64-pc-linux-gnu/14/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with:
/var/tmp/portage/sys-devel/gcc-14.0.0_pre20231112/work/gcc-14-20231112/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.0_pre20231112 p8' --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.0 20231109 (experimental) (Gentoo Hardened 14.0.0_pre20231112
p8)
```

'g++ -c Session.cc.ii -march=znver2' seems to be enough to reproduce.

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

* [Bug c++/112515] [14 regression] ICE when building Transmission in standard_conversion
  2023-11-13 17:51 [Bug c++/112515] New: [14 regression] ICE when building Transmission in standard_conversion sjames at gcc dot gnu.org
@ 2023-11-13 17:58 ` pinskia at gcc dot gnu.org
  2023-11-13 18:03 ` mpolacek at gcc dot gnu.org
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-11-13 17:58 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |14.0
           Keywords|                            |ice-on-valid-code

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

* [Bug c++/112515] [14 regression] ICE when building Transmission in standard_conversion
  2023-11-13 17:51 [Bug c++/112515] New: [14 regression] ICE when building Transmission in standard_conversion sjames at gcc dot gnu.org
  2023-11-13 17:58 ` [Bug c++/112515] " pinskia at gcc dot gnu.org
@ 2023-11-13 18:03 ` mpolacek at gcc dot gnu.org
  2023-11-13 18:14 ` pinskia at gcc dot gnu.org
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: mpolacek at gcc dot gnu.org @ 2023-11-13 18:03 UTC (permalink / raw)
  To: gcc-bugs

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

Marek Polacek <mpolacek at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P1
   Last reconfirmed|                            |2023-11-13
             Status|UNCONFIRMED                 |NEW
     Ever confirmed|0                           |1
                 CC|                            |mpolacek at gcc dot gnu.org,
                   |                            |ppalka at gcc dot gnu.org
           Keywords|                            |needs-reduction

--- Comment #1 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Started with r14-4793:

commit dad311874ac3b3cf4eca1c04f67cae80c953f7b8
Author: Patrick Palka <ppalka@redhat.com>
Date:   Fri Oct 20 10:45:00 2023 -0400

    c++: remove NON_DEPENDENT_EXPR, part 1

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

* [Bug c++/112515] [14 regression] ICE when building Transmission in standard_conversion
  2023-11-13 17:51 [Bug c++/112515] New: [14 regression] ICE when building Transmission in standard_conversion sjames at gcc dot gnu.org
  2023-11-13 17:58 ` [Bug c++/112515] " pinskia at gcc dot gnu.org
  2023-11-13 18:03 ` mpolacek at gcc dot gnu.org
@ 2023-11-13 18:14 ` pinskia at gcc dot gnu.org
  2023-11-13 18:16 ` [Bug c++/112515] [14 regression] ICE when building Transmission in standard_conversion with {} and type depdent and enum class pinskia at gcc dot gnu.org
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-11-13 18:14 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Reduced testcase:
```
enum class Ordering { SMALLER = -1, EQUAL, LARGER };
template <typename T>
Ordering compare_vfunc(T t) {
  return Ordering{compare(t)};
}

```

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

* [Bug c++/112515] [14 regression] ICE when building Transmission in standard_conversion with {} and type depdent and enum class
  2023-11-13 17:51 [Bug c++/112515] New: [14 regression] ICE when building Transmission in standard_conversion sjames at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2023-11-13 18:14 ` pinskia at gcc dot gnu.org
@ 2023-11-13 18:16 ` pinskia at gcc dot gnu.org
  2023-11-14  2:14 ` [Bug c++/112515] [14 regression] ICE when building Transmission in standard_conversion with {} and type depdent and enum class and function call since r14-4793-gdad311874ac3b3 ppalka at gcc dot gnu.org
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-11-13 18:16 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|[14 regression] ICE when    |[14 regression] ICE when
                   |building Transmission in    |building Transmission in
                   |standard_conversion         |standard_conversion with {}
                   |                            |and type depdent and enum
                   |                            |class

--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Andrew Pinski from comment #2)
> Reduced testcase:
> ```
> enum class Ordering { SMALLER = -1, EQUAL, LARGER };
> template <typename T>
> Ordering compare_vfunc(T t) {
>   return Ordering{compare(t)};
> }
> 
> ```

Note the following definition of Ordering also causes the ICE:
```
enum  Ordering : int { SMALLER = -1, EQUAL, LARGER };
```

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

* [Bug c++/112515] [14 regression] ICE when building Transmission in standard_conversion with {} and type depdent and enum class and function call since r14-4793-gdad311874ac3b3
  2023-11-13 17:51 [Bug c++/112515] New: [14 regression] ICE when building Transmission in standard_conversion sjames at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2023-11-13 18:16 ` [Bug c++/112515] [14 regression] ICE when building Transmission in standard_conversion with {} and type depdent and enum class pinskia at gcc dot gnu.org
@ 2023-11-14  2:14 ` ppalka at gcc dot gnu.org
  2023-11-15 17:24 ` cvs-commit at gcc dot gnu.org
  2023-11-15 17:25 ` ppalka at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: ppalka at gcc dot gnu.org @ 2023-11-14  2:14 UTC (permalink / raw)
  To: gcc-bugs

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

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
           Keywords|needs-reduction             |
             Status|NEW                         |ASSIGNED

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

* [Bug c++/112515] [14 regression] ICE when building Transmission in standard_conversion with {} and type depdent and enum class and function call since r14-4793-gdad311874ac3b3
  2023-11-13 17:51 [Bug c++/112515] New: [14 regression] ICE when building Transmission in standard_conversion sjames at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2023-11-14  2:14 ` [Bug c++/112515] [14 regression] ICE when building Transmission in standard_conversion with {} and type depdent and enum class and function call since r14-4793-gdad311874ac3b3 ppalka at gcc dot gnu.org
@ 2023-11-15 17:24 ` cvs-commit at gcc dot gnu.org
  2023-11-15 17:25 ` ppalka at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-11-15 17:24 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from CVS 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:b126f3ffbef59b0b08c2c2a664133d7d6f5ca235

commit r14-5505-gb126f3ffbef59b0b08c2c2a664133d7d6f5ca235
Author: Patrick Palka <ppalka@redhat.com>
Date:   Wed Nov 15 12:24:38 2023 -0500

    c++: direct enum init from type-dep elt [PR112515]

    The NON_DEPENDENT_EXPR removal exposed that is_direct_enum_init can be
    called in a template context on a CONSTRUCTOR that isn't type-dependent
    but whose element is.

            PR c++/112515

    gcc/cp/ChangeLog:

            * decl.cc (is_direct_enum_init): Check type-dependence of the
            single element.

    gcc/testsuite/ChangeLog:

            * g++.dg/template/non-dependent30.C: New test.

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

* [Bug c++/112515] [14 regression] ICE when building Transmission in standard_conversion with {} and type depdent and enum class and function call since r14-4793-gdad311874ac3b3
  2023-11-13 17:51 [Bug c++/112515] New: [14 regression] ICE when building Transmission in standard_conversion sjames at gcc dot gnu.org
                   ` (5 preceding siblings ...)
  2023-11-15 17:24 ` cvs-commit at gcc dot gnu.org
@ 2023-11-15 17:25 ` ppalka at gcc dot gnu.org
  6 siblings, 0 replies; 8+ messages in thread
From: ppalka at gcc dot gnu.org @ 2023-11-15 17:25 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

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

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

end of thread, other threads:[~2023-11-15 17:25 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-11-13 17:51 [Bug c++/112515] New: [14 regression] ICE when building Transmission in standard_conversion sjames at gcc dot gnu.org
2023-11-13 17:58 ` [Bug c++/112515] " pinskia at gcc dot gnu.org
2023-11-13 18:03 ` mpolacek at gcc dot gnu.org
2023-11-13 18:14 ` pinskia at gcc dot gnu.org
2023-11-13 18:16 ` [Bug c++/112515] [14 regression] ICE when building Transmission in standard_conversion with {} and type depdent and enum class pinskia at gcc dot gnu.org
2023-11-14  2:14 ` [Bug c++/112515] [14 regression] ICE when building Transmission in standard_conversion with {} and type depdent and enum class and function call since r14-4793-gdad311874ac3b3 ppalka at gcc dot gnu.org
2023-11-15 17:24 ` cvs-commit at gcc dot gnu.org
2023-11-15 17:25 ` 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).