https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118277
Bug ID: 118277
Summary: avr-g++ segfaults in constexpr string calculation
Product: gcc
Version: 15.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: crab.delicieux at pm dot me
Target Milestone: ---
Created attachment 60033
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=60033&action=edit
Archive containing original source code + .ii output from GCC + full build
output (output.log)
Hello,
I encountered a weird bug when compiling a file using avr-g++ (with a version I
built myself, that otherwise works normally...). The bug seems to appear during
the translation to assembler (the avr-g++ -S call fails, i.e. before assembly).
It is to be noted that the code should not compile anyway, for various reason.
On "normal" g++ (from Debian 12 repo) the compiler does indeed terminate and
yield various (expected) errors.
I think the main problem comes from an uncanny use of template parameters (and
especially strings in non-type template parameters and compile-time string
calculation used in asm clauses (don't ask)), or maybe because of the use of
auto?
If you have any question/remark please do not hesitate to come back to me.
Note that imho the bug is not blocking (I have to fix the errors and I have
plenty of workarounds to test).
Thanks!
Best regards,
krab.