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

            Bug ID: 105094
           Summary: UBSAN in clear_bit_region(unsigned char*, unsigned
                    int, unsigned int) (gimple-ssa-store-merging.cc:1834)
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Keywords: ice-on-invalid-code
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: marxin at gcc dot gnu.org
                CC: jakub at gcc dot gnu.org
  Target Milestone: ---

Happens for:

$ g++ /home/marxin/Programming/gcc/gcc/testsuite/g++.dg/other/pr84964.C -O1
-fstore-merging -fpack-struct -ftrivial-auto-var-init=zero
/home/marxin/Programming/gcc/gcc/testsuite/g++.dg/other/pr84964.C:4:9: warning:
width of ‘a::b’ exceeds its type
    4 |   short b : -1ULL;
      |         ^
malloc(): invalid size (unsorted)
malloc(): invalid size (unsorted)
g++: internal compiler error: Aborted signal terminated program cc1plus
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
See <https://gcc.gnu.org/bugs/> for instructions.

Note we emit sorry if I remove any of the options.

Reply via email to