https://gcc.gnu.org/bugzilla/show_bug.cgi?id=124151

            Bug ID: 124151
           Summary: internal compiler error: in analyze_access_subtree, at
                    tree-sra.cc:2935
           Product: gcc
           Version: 15.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: tobiausgais at gmail dot com
  Target Milestone: ---

during GIMPLE pass: sra
../src/http/v2.c: In function ‘parse_http2_frame’:
../src/http/v2.c:1534:35: internal compiler error: in analyze_access_subtree,
at tree-sra.cc:2935
 1534 | NODISCARD static Http2FrameResult parse_http2_frame(const HTTP2Context*
const context,
      |                                   ^~~~~~~~~~~~~~~~~
0x71aee362a574 __libc_start_call_main
        ../sysdeps/nptl/libc_start_call_main.h:58
0x71aee362a627 __libc_start_main_impl
        ../csu/libc-start.c:360


I searched the bugs and couldn't find any similar issue, I also tried to make a
reproducible example, but couldn't manage to make one. I use "tagged unions"
heavily, and the enums that tag these "unions" have a type specifier (enum Name
: <type> { ...)  these look like "struct {enum Xy type; union {<list of
values>} data}" and the function one which the tree-sra fails (only with O2 and
O3) returns such a value. I use quite a few extra, pedantic and other flags.

When specifying "-fno-tree-sra" the bug goes away, so the crash originates in
the tree-sra optimizer.

As I unfortunately couldn't make a minimal example, the source code is rather
huge, but the problem seems rather complex:

Source Code:
    https://github.com/Totto16/my_simple_c_http_server
    Commit: ee2ea1a14a6fad6c966435cc06e6c30c154e39fc

Setup: "meson setup build_gcc_rel -Dbuildtype=release --fatal-meson-warnings
-Dsecure=enabled -Dcompression_features=zstd,br,deflate,gzip,compress
-Dother_features='bcrypt,pam'"

GCC version: gcc-15 (Ubuntu 15.2.0-4ubuntu4) 15.2.0

System: Ubuntu 25.10

GCC was built by canonical, just using the default ubuntu gcc-15 deb

The generated crash file and the report file generated by using "-freport-bug"
was too huge, so you can find it here: 
    https://gist.github.com/Totto16/af768027facec604174d88edf8d09049

Reply via email to