Bugzilla (bugzilla.redhat.com) will be under maintenance for infrastructure upgrades and will not be available on July 31st between 12:30 AM - 05:30 AM UTC. We appreciate your understanding and patience. You can follow status.redhat.com for details.
Bug 1810941 - static_cast bug in GCC 10
Summary: static_cast bug in GCC 10
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: gcc
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-03-06 09:28 UTC by Vasiliy Glazov
Modified: 2020-10-05 08:32 UTC (History)
11 users (show)

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:
Clone Of:
Environment:
Last Closed: 2020-03-12 11:31:50 UTC
Type: Bug


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
GNU Compiler Collection 94067 0 P1 RESOLVED [10 Regression] ICE on rotate with -Wconversion since r10-6527 2020-04-07 21:01:29 UTC

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.


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