Bug 1810941

Summary: static_cast bug in GCC 10
Product: [Fedora] Fedora Reporter: Vasiliy Glazov <vascom2>
Component: gccAssignee: Jakub Jelinek <jakub>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: aoliva, avi.kivity, dmalcolm, fweimer, jakub, jwakely, law, mpolacek, msebor, nickc, sipoyare
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: gcc-10.0.1-0.9.fc33 gcc-10.0.1-0.9.fc32 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-03-12 11:31:50 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:

Description Vasiliy Glazov 2020-03-06 09:28:11 UTC
Description of problem:
I am try to build megasync in rpmfusion and it failed with gcc 10.

Version-Release number of selected component (if applicable):
gcc-c++ 10.0.1-0.8.fc33

google_breakpad/common/string_conversion.cc: In function 'uint16_t google_breakpad::Swap(uint16_t)':
google_breakpad/common/string_conversion.cc:118:57: sorry, unimplemented: unexpected AST of kind lrotate_expr
  118 |   return (value >> 8) | static_cast<uint16_t>(value << 8);
      |                                                         ^

Full build log http://koji.rpmfusion.org/kojifiles/work/tasks/1656/391656/build.log

Problem in this code:

static inline uint16_t Swap(uint16_t value) {
  return (value >> 8) | static_cast<uint16_t>(value << 8);
}


Please update gcc to latest commit or pay attention to new bug.

Comment 1 Jakub Jelinek 2020-03-06 10:37:17 UTC
As a workaround, take out -Wconversion from the flags (or add -Wno-conversion at the end).

Comment 2 Jakub Jelinek 2020-03-12 10:37:17 UTC
Should be fixed in gcc-10.0.1-0.9.fc{32,33}, the f32 version hasn't finished building yet.

Comment 3 Vasiliy Glazov 2020-03-12 11:05:57 UTC
Seems that need to rebuild annobin for new gcc.

annobin: gui/SettingsDialog.cpp: ICE: The size of the global_options structure has changed - please rebuild annobin
annobin: gui/SettingsDialog.cpp: ICE: Please contact the annobin maintainer with details of this problem
annobin: gui/SettingsDialog.cpp: Build time size: 0x14a0 run time size: 0x14a8 (64-bit host)

Comment 4 Vasiliy Glazov 2020-03-12 11:31:08 UTC
Thanks.
Now all work good in rawhide.

Comment 5 Fedora Update System 2020-03-13 10:48:51 UTC
FEDORA-2020-d927e07eb1 has been submitted as an update to Fedora 32. https://bodhi.fedoraproject.org/updates/FEDORA-2020-d927e07eb1

Comment 6 Fedora Update System 2020-03-13 18:33:45 UTC
annobin-9.06-4.fc32, gcc-10.0.1-0.9.fc32 has been pushed to the Fedora 32 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-d927e07eb1

Comment 7 Fedora Update System 2020-03-16 20:39:19 UTC
annobin-9.06-4.fc32, gcc-10.0.1-0.9.fc32 has been pushed to the Fedora 32 stable repository. If problems still persist, please make note of it in this bug report.