Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 869536 - cross-avr/gcc-13.0.0_pre20220904 (sys-devel/gcc) Internal compiler error in add_clobbers, at config/avr/avr-dimode.md:2705
Summary: cross-avr/gcc-13.0.0_pre20220904 (sys-devel/gcc) Internal compiler error in a...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2022-09-10 16:48 UTC by Michael Moon
Modified: 2023-05-28 16:02 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
avr-gcc-bug-105753_1.patch (avr-gcc-bug-105753_1.patch,2.97 KB, patch)
2022-09-10 16:48 UTC, Michael Moon
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Moon 2022-09-10 16:48:58 UTC
Created attachment 804511 [details, diff]
avr-gcc-bug-105753_1.patch

Upstream bug: https://gcc.gnu.org/bugzilla//show_bug.cgi?id=105753

Patch for fix suggested in that bug's Comment 1 attached - seems to work for me, although I don't understand nearly enough about compiler internals to know what precisely it does.

I don't know which is the first release of cross-avr/gcc series affected by this issue, I just stumbled across it today - upstream bug is 3.5 months old though, the commit it blames is 4.5 months old, and one commenter says it may affect releases as old as 12.1.

I have a short (~20 line) bit of (Arduino) test code where changing a char to an int will trigger the bug, and changing it back will no longer trigger the bug at https://gist.github.com/triffid/bd72429605b810ca30e54ac8b26624a6 if anyone's curious - the code won't actually run though because it skips a bunch of setup and feeds a method an uninitialized instance of its own class for brevity of demonstrating the compiler bug.
Comment 1 Michael Moon 2022-09-11 10:22:24 UTC
I have posted the attached patch to the upstream bug and confirmed that it appears to fix the issue.
Comment 2 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-05-27 14:49:41 UTC
Will be in today's 13 snapshot. Thank you!
Comment 3 Larry the Git Cow gentoo-dev 2023-05-28 16:02:08 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8cba73661e286989eae65f5b1c26dbc2eb899568

commit 8cba73661e286989eae65f5b1c26dbc2eb899568
Author:     Sam James <sam@gentoo.org>
AuthorDate: 2023-05-28 16:01:43 +0000
Commit:     Sam James <sam@gentoo.org>
CommitDate: 2023-05-28 16:01:43 +0000

    sys-devel/gcc: keyword 13.1.1_p20230527
    
    Closes: https://bugs.gentoo.org/869536
    Closes: https://bugs.gentoo.org/905818
    Signed-off-by: Sam James <sam@gentoo.org>

 sys-devel/gcc/gcc-13.1.1_p20230527.ebuild | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)