Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 2214847

Summary: internal compiler error: output_operand: invalid %-code
Product: Red Hat Enterprise Linux 8 Reporter: Jan Horak <jhorak>
Component: gccAssignee: Marek Polacek <mpolacek>
gcc sub component: system-version QA Contact: Václav Kadlčík <vkadlcik>
Status: CLOSED ERRATA Docs Contact:
Severity: unspecified    
Priority: unspecified CC: ahajkova, fweimer, jakub, mpolacek, ohudlick, sipoyare, vkadlcik
Version: 8.8Keywords: Bugfix, Triaged, ZStream
Target Milestone: rcFlags: pm-rhel: mirror+
Target Release: ---   
Hardware: s390x   
OS: Unspecified   
Whiteboard:
Fixed In Version: gcc-8.5.0-20.el8 Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of:
: 2238402 2238403 2238404 2238405 (view as bug list) Environment:
Last Closed: 2023-11-14 15:48:38 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 2238402, 2238403, 2238404, 2238405    
Attachments:
Description Flags
preprocessed source none

Description Jan Horak 2023-06-13 20:15:44 UTC
Created attachment 1970746 [details]
preprocessed source

/usr/bin/g++ -std=gnu++17 -o generated_message_tctable_lite.o -c  -I/root/rpmbuild/BUILD/firefox-115.0/objdir/dist/stl_wrappers -I/root/rpmbuild/BUILD/firefox-115.0/objdir/dist/system_wrappers -include /root/rpmbuild/BUILD/firefox-115.0/config/gcc_hidden.h -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fstack-protector-strong -DNDEBUG=1 -DTRIMMED=1 -DGOOGLE_PROTOBUF_NO_RTTI -DGOOGLE_PROTOBUF_NO_STATIC_INITIALIZER -DHAVE_PTHREAD -DHAVE_ZLIB -DMOZ_HAS_MOZGLUE -DMOZILLA_INTERNAL_API -DIMPL_LIBXUL -DSTATIC_EXPORTABLE_JS_API -I/root/rpmbuild/BUILD/firefox-115.0/toolkit/components/protobuf -I/root/rpmbuild/BUILD/firefox-115.0/objdir/toolkit/components/protobuf -I/root/rpmbuild/BUILD/firefox-115.0/objdir/dist/include -I/root/rpmbuild/BUILD/firefox-115.0/objdir/dist/include/nspr -I/root/rpmbuild/BUILD/firefox-115.0/objdir/dist/include/nss -DMOZILLA_CLIENT -include /root/rpmbuild/BUILD/firefox-115.0/objdir/mozilla-config.h -fno-sized-deallocation -fno-aligned-new -O2 -g -pipe -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -march=z13 -mtune=z14 -fasynchronous-unwind-tables -fstack-clash-protection -Wformat-security -Wformat -Werror=format-security -fPIC -Wl,-z,relro -Wl,-z,now -DNSS_PKCS11_3_0_STRICT -fno-exceptions -fPIC -fno-rtti -ffunction-sections -fdata-sections -fno-exceptions -fno-math-errno -pthread -pipe -gdwarf-4 -g -O1 -fomit-frame-pointer -funwind-tables -Wall -Wempty-body -Wignored-qualifiers -Wpointer-arith -Wsign-compare -Wtype-limits -Wunreachable-code -Wno-invalid-offsetof -Wno-error=deprecated -Wduplicated-cond -Wimplicit-fallthrough -Wlogical-op -Wno-error=maybe-uninitialized -Wno-error=deprecated-declarations -Wno-error=array-bounds -Wno-error=free-nonheap-object -Wno-multistatement-macros -Wno-error=class-memaccess -Wformat -Wformat-overflow=2 -Wno-psabi -Wno-error=builtin-macro-redefined -Wno-ignored-qualifiers -Wno-maybe-uninitialized -Wno-return-type -Wno-sign-compare -Wno-subobject-linkage -Wno-unused-function -I/usr/include/gtk-3.0 -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/fribidi -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/uuid -I/usr/include/harfbuzz -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/gio-unix-2.0/ -I/usr/include/atk-1.0 -I/usr/include/at-spi2-atk/2.0 -I/usr/include/at-spi-2.0 -I/usr/include/dbus-1.0 -I/usr/lib64/dbus-1.0/include -I/usr/include/gtk-3.0/unix-print -pthread -fno-strict-aliasing -ffp-contract=off  -MD -MP -MF .deps/generated_message_tctable_lite.o.pp   /root/rpmbuild/BUILD/firefox-115.0/toolkit/components/protobuf/src/google/protobuf/generated_message_tctable_lite.cc
*** WARNING *** there are active plugins, do not report this as a bug unless you can reproduce it without enabling any plugins.
Event                            | Plugins
PLUGIN_FINISH_UNIT               | annobin: Generate final annotations
PLUGIN_START_UNIT                | annobin: Generate global annotations
PLUGIN_ALL_PASSES_START          | annobin: Generate per-function annotations
PLUGIN_ALL_PASSES_END            | annobin: Register per-function end symbols
during RTL pass: final
/root/rpmbuild/BUILD/firefox-115.0/toolkit/components/protobuf/src/google/protobuf/generated_message_tctable_lite.cc: In static member function ‘static const char* google::protobuf::internal::TcParser::MiniParse(google::protobuf::MessageLite*, const char*, google::protobuf::internal::ParseContext*, const google::protobuf::internal::TcParseTableBase*, uint64_t, google::protobuf::internal::TcFieldData)’:
/root/rpmbuild/BUILD/firefox-115.0/toolkit/components/protobuf/src/google/protobuf/generated_message_tctable_lite.cc:342:1: internal compiler error: output_operand: invalid %-code
 }
 ^
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://bugzilla.redhat.com/bugzilla> for instructions.
{standard input}: Assembler messages:
{standard input}:15334: Warning: end of file not at end of a line; newline inserted
{standard input}:15514: Error: missing operand
{standard input}:15514: Error: syntax error; expected ','
{standard input}:15514: Error: missing operand
{standard input}: Error: open CFI at the end of file; missing .cfi_endproc directive

Comment 2 Jakub Jelinek 2023-06-14 08:02:57 UTC
This was fixed upstream for GCC 9 and later in https://gcc.gnu.org/PR87723
We just need to cherry-pick that fix, should apply cleanly.

Short testcase -O2 -march=z10:
unsigned long
foo (unsigned long x, unsigned long y)
{
  unsigned long z = (x << 57) | (x >> 7);
  z &= 0xfe00000000000000UL;
  return z | y;
}

Comment 3 Marek Polacek 2023-06-15 21:20:16 UTC
# rpm -q gcc
gcc-8.5.0-19.el8.s390x
# gcc bz.c -c -O2 -march=z10
during RTL pass: final
bz.c: In function ‘foo’:
bz.c:7:1: internal compiler error: output_operand: invalid %-code
 }
 ^
# rpm -q gcc
gcc-8.5.0-20.el8.s390x
# gcc bz.c -c -O2 -march=z10
# OK

Comment 13 errata-xmlrpc 2023-11-14 15:48:38 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (gcc bug fix and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHEA-2023:7099