Bug 2336214 - GCC 15 mass prebuild: neochat: "internal compiler error: in gimplify_var_or_parm_decl, at gimplify.cc:3315"
Summary: GCC 15 mass prebuild: neochat: "internal compiler error: in gimplify_var_or_p...
Keywords:
Status: NEW
Alias: None
Product: Fedora
Classification: Fedora
Component: gcc
Version: 42
Hardware: Unspecified
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: gcc-15-mass-prebuild
TreeView+ depends on / blocked
 
Reported: 2025-01-07 19:33 UTC by Dave Malcolm
Modified: 2025-02-26 13:21 UTC (History)
12 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed:
Type: ---
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
GNU Compiler Collection 116914 0 P3 ASSIGNED [15 regression] ICE when building plasma-nm-6.1.5 (gimplify_var_or_parm_decl, at gimplify.cc:3309) with -std=gnu++20 2025-01-07 22:30:28 UTC

Description Dave Malcolm 2025-01-07 19:33:48 UTC
Seen on this build:
  https://copr.fedorainfracloud.org/coprs/dmalcolm/gcc-15-smoketest-3.failed/build/8476804/

using gcc-15.0.0-0.2.fc42 from this scratch build by Jakub: 
   https://koji.fedoraproject.org/koji/taskinfo?taskID=126495782

/usr/bin/g++ -DHAVE_ICU -DHAVE_KDBUSADDONS -DHAVE_KIO -DHAVE_KUNIFIEDPUSH -DHAVE_RUNNER -DHAVE_WINDOWSYSTEM -DHAVE_X11=1 -DKCOREADDONS_LIB -DQT_CORE_LIB -DQT_DBUS_LIB -DQT_GUI_LIB -DQT_MULTIMEDIA_LIB -DQT_NETWORK_LIB -DQT_NO_CAST_FROM_ASCII -DQT_NO_CAST_FROM_BYTEARRAY -DQT_NO_CAST_TO_ASCII -DQT_NO_DEBUG -DQT_NO_FOREACH -DQT_NO_KEYWORDS -DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT -DQT_NO_URL_CAST_FROM_STRING -DQT_OPENGL_LIB -DQT_QMLINTEGRATION_LIB -DQT_QMLMETA_LIB -DQT_QMLMODELS_LIB -DQT_QMLWORKERSCRIPT_LIB -DQT_QML_LIB -DQT_QUICKCONTROLS2_LIB -DQT_QUICK_LIB -DQT_SQL_LIB -DQT_STRICT_ITERATORS -DQT_USE_QSTRINGBUILDER -DQT_WIDGETS_LIB -DQuotient_E2EE_ENABLED -DQuotient_PRE_STAGE=\"\" -DQuotient_VERSION_MAJOR=0 -DQuotient_VERSION_MINOR=9 -DQuotient_VERSION_PATCH=2 -DQuotient_VERSION_STRING=\"0.9.2\" -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -I/builddir/build/BUILD/neochat-24.12.0-build/neochat-24.12.0/redhat-linux-build/src -I/builddir/build/BUILD/neochat-24.12.0-build/neochat-24.12.0/src -I/builddir/build/BUILD/neochat-24.12.0-build/neochat-24.12.0/redhat-linux-build/src/neochat_autogen/include -I/builddir/build/BUILD/neochat-24.12.0-build/neochat-24.12.0/redhat-linux-build -I/builddir/build/BUILD/neochat-24.12.0-build/neochat-24.12.0/src/models -I/builddir/build/BUILD/neochat-24.12.0-build/neochat-24.12.0/src/enums -I/builddir/build/BUILD/neochat-24.12.0-build/neochat-24.12.0/redhat-linux-build/src/settings -I/builddir/build/BUILD/neochat-24.12.0-build/neochat-24.12.0/src/settings -I/builddir/build/BUILD/neochat-24.12.0-build/neochat-24.12.0/redhat-linux-build/src/timeline -I/builddir/build/BUILD/neochat-24.12.0-build/neochat-24.12.0/src/timeline -I/builddir/build/BUILD/neochat-24.12.0-build/neochat-24.12.0/redhat-linux-build/src/devtools -I/builddir/build/BUILD/neochat-24.12.0-build/neochat-24.12.0/src/devtools -I/builddir/build/BUILD/neochat-24.12.0-build/neochat-24.12.0/redhat-linux-build/src/login -I/builddir/build/BUILD/neochat-24.12.0-build/neochat-24.12.0/src/login -I/builddir/build/BUILD/neochat-24.12.0-build/neochat-24.12.0/redhat-linux-build/src/chatbar -I/builddir/build/BUILD/neochat-24.12.0-build/neochat-24.12.0/src/chatbar -isystem /usr/include/qt6/QtQml/6.8.1 -isystem /usr/include/qt6/QtQml/6.8.1/QtQml -isystem /usr/include/qt6/QtCore/6.8.1 -isystem /usr/include/qt6/QtCore/6.8.1/QtCore -isystem /usr/include/qt6/QtCore -isystem /usr/include/qt6 -isystem /usr/lib64/qt6/mkspecs/linux-g++ -isystem /usr/include/qt6/QtQml -isystem /usr/include/qt6/QtQmlIntegration -isystem /usr/include/qt6/QtNetwork -isystem /usr/include/KF6/KStatusNotifierItem -isystem /usr/include/qt6/QtGui -isystem /usr/include/qt6/QtWidgets -isystem /usr/include/qt6/QtDBus -isystem /usr/include/KF6/KWindowSystem -isystem /usr/include/qt6/QtQuick -isystem /usr/include/qt6/QtQmlMeta -isystem /usr/include/qt6/QtQmlModels -isystem /usr/include/qt6/QtQmlWorkerScript -isystem /usr/include/qt6/QtOpenGL -isystem /usr/include/qt6/QtMultimedia -isystem /usr/include/qt6/QtQuickControls2 -isystem /usr/include/KF6/KI18n -isystem /usr/include/KF6 -isystem /usr/include/KF6/Kirigami/Platform -isystem /usr/include/KF6/KNotifications -isystem /usr/include/KF6/KConfig -isystem /usr/include/KF6/KConfigCore -isystem /usr/include/KF6/KConfigGui -isystem /usr/include/KF6/KCoreAddons -isystem /usr/include/KF6/SonnetCore -isystem /usr/include/KF6/Sonnet -isystem /usr/include/KF6/KColorScheme -isystem /usr/include/KF6/KItemModels -isystem /usr/include/QuotientQt6 -isystem /usr/include/qt6/QtSql -isystem /usr/include/qcoro6 -isystem /usr/include/qcoro6/qcoro -isystem /usr/include/qcoro6/QCoro -isystem /usr/include/KF6/KCrash -isystem /usr/include/KF6/KIOWidgets -isystem /usr/include/KF6/KIOGui -isystem /usr/include/KF6/KIOCore -isystem /usr/include/KF6/KIO -isystem /usr/include/KF6/KService -isystem /usr/include/KF6/KJobWidgets -isystem /usr/include/KF6/Solid -isystem /usr/include/KF6/KCompletion -isystem /usr/include/KF6/KWidgetsAddons -isystem /usr/include/KF6/KSyntaxHighlighting -isystem /usr/include/KF6/KDBusAddons -isystem /usr/include/KUnifiedPush -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1  -m64 -march=x86-64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -mtls-dialect=gnu2 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -fno-operator-names -fno-exceptions -Wall -Wextra -Wcast-align -Wchar-subscripts -Wformat-security -Wno-long-long -Wpointer-arith -Wundef -Wnon-virtual-dtor -Woverloaded-virtual -Werror=return-type -Werror=init-self -Werror=undef -Wvla -Wdate-time -Wsuggest-override -Wlogical-op -pedantic -Wzero-as-null-pointer-constant -Wmissing-include-dirs -fdiagnostics-color=always -fcoroutines -DNDEBUG -std=gnu++23 -fvisibility=hidden -fvisibility-inlines-hidden -MD -MT src/CMakeFiles/neochat.dir/neochatroom.cpp.o -MF src/CMakeFiles/neochat.dir/neochatroom.cpp.o.d -o src/CMakeFiles/neochat.dir/neochatroom.cpp.o -c /builddir/build/BUILD/neochat-24.12.0-build/neochat-24.12.0/src/neochatroom.cpp
/builddir/build/BUILD/neochat-24.12.0-build/neochat-24.12.0/src/neochatroom.cpp: In function ‘void NeoChatRoom::doDeleteMessagesByUser(_ZN11NeoChatRoom22doDeleteMessagesByUserERK7QStringS0_.Frame*)’:
/builddir/build/BUILD/neochat-24.12.0-build/neochat-24.12.0/src/neochatroom.cpp:905:1: internal compiler error: in gimplify_var_or_parm_decl, at gimplify.cc:3315
  905 | }
      | ^
Please submit a full bug report, with preprocessed source (by using -freport-bug).
See <http://bugzilla.redhat.com/bugzilla> for instructions.
Preprocessed source stored into /tmp/ccO2ybjq.out file, please attach this to your bugreport.

Seems to have happened on every arch I tried it on.


Reproducible: Didn't try

Comment 1 Marek Polacek 2025-01-07 21:42:56 UTC
Reproduced with trunk:

$ ./cc1plus -quiet neochatroom.ii -std=gnu++23
/builddir/build/BUILD/neochat-24.12.0-build/neochat-24.12.0/src/neochatroom.cpp: In function ‘void NeoChatRoom::doDeleteMessagesByUser(_ZN11NeoChatRoom22doDeleteMessagesByUserERK7QStringS0_.Frame*)’:
/builddir/build/BUILD/neochat-24.12.0-build/neochat-24.12.0/src/neochatroom.cpp:905:1: internal compiler error: in gimplify_var_or_parm_decl, at gimplify.cc:3341
0x3078605 internal_error(char const*, ...)
	/home/mpolacek/src/gcc/gcc/diagnostic-global-context.cc:517
0x3048221 fancy_abort(char const*, int, char const*)
	/home/mpolacek/src/gcc/gcc/diagnostic.cc:1722
0xd1cb19 gimplify_var_or_parm_decl
	/home/mpolacek/src/gcc/gcc/gimplify.cc:3341
0xd1ceb3 gimplify_compound_lval
	/home/mpolacek/src/gcc/gcc/gimplify.cc:3464
0xd60867 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*), int)
	/home/mpolacek/src/gcc/gcc/gimplify.cc:18814
0xd2b48d gimplify_addr_expr
	/home/mpolacek/src/gcc/gcc/gimplify.cc:7363
0xd60dac gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*), int)
	/home/mpolacek/src/gcc/gcc/gimplify.cc:18912
0xd64acc gimplify_expr
	/home/mpolacek/src/gcc/gcc/gimplify.cc:19956
0xd1de6a gimplify_arg(tree_node**, gimple**, unsigned long, bool)
	/home/mpolacek/src/gcc/gcc/gimplify.cc:3827
0x4e1bf3 cp_gimplify_arg
	/home/mpolacek/src/gcc/gcc/cp/cp-gimplify.cc:587
0x4e3263 cp_gimplify_expr(tree_node**, gimple**, gimple**)
	/home/mpolacek/src/gcc/gcc/cp/cp-gimplify.cc:859
0xd60658 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*), int)
	/home/mpolacek/src/gcc/gcc/gimplify.cc:18771
0xd64acc gimplify_expr
	/home/mpolacek/src/gcc/gcc/gimplify.cc:19956
0xd1de6a gimplify_arg(tree_node**, gimple**, unsigned long, bool)
	/home/mpolacek/src/gcc/gcc/gimplify.cc:3827
0xd20ff5 gimplify_call_expr
	/home/mpolacek/src/gcc/gcc/gimplify.cc:4409
0xd60911 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*), int)
	/home/mpolacek/src/gcc/gcc/gimplify.cc:18834
0xd29756 gimplify_modify_expr
	/home/mpolacek/src/gcc/gcc/gimplify.cc:6916
0xd60a19 gimplify_expr(tree_node**, gimple**, gimple**, bool (*)(tree_node*), int)
	/home/mpolacek/src/gcc/gcc/gimplify.cc:18865
0xd2dfad gimplify_stmt(tree_node**, gimple**)
	/home/mpolacek/src/gcc/gcc/gimplify.cc:8039
0xd2d48b gimplify_cleanup_point_expr
	/home/mpolacek/src/gcc/gcc/gimplify.cc:7777

Comment 2 Marek Polacek 2025-01-07 21:59:32 UTC
Started with r15-3840:

commit 650e91566561870f3d1c8d5b92e6613296ee1a8d
Author: Jakub Jelinek <jakub>
Date:   Tue Sep 24 20:19:50 2024 +0200

    c++: Implement C++23 P2718R0 - Wording for P2644R1 Fix for Range-based for Loop [PR107637]


I'll try to reduce, but it'll take a long time -- the testcase is 7.1M.

Comment 3 Jakub Jelinek 2025-01-07 22:06:56 UTC
Is that coroutines related?
There is still PR117231 still unclosed, and I think various gimplify_var_or_parm_decl coroutine ICE PRs too, e.g. PR116914.

Comment 4 Jakub Jelinek 2025-01-07 22:10:08 UTC
https://gcc.gnu.org/pipermail/gcc-patches/2024-November/670404.html
Jason replied but I haven't seen further changes from Iain.

Comment 5 Marek Polacek 2025-01-07 22:30:28 UTC
Yeah, I see co_await, co_return etc.  And Iain's patch fixes the crash.

So I'm not going to reduce this anymore, since we already have a minimized test case.

Comment 6 Aoife Moloney 2025-02-26 13:21:32 UTC
This bug appears to have been reported against 'rawhide' during the Fedora Linux 42 development cycle.
Changing version to 42.


Note You need to log in before you can comment on or make changes to this bug.