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

            Bug ID: 112500
           Summary: GCC: 14: internal compiler error: in expand_asm_stmt,
                    at cfgexpand.cc:3419
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: 141242068 at smail dot nju.edu.cn
  Target Milestone: ---

Compiler Explorer: https://gcc.godbolt.org/z/PbTj4Gq3r

When compiling this program with `gcc-14 -O0`, gcc crashes:
```
void f(char *a, unsigned int l) {
  asm volatile("" ::"m"((char (*)[l])a--));
}
```

The crash output:
```
during RTL pass: expand
<source>: In function 'f':
<source>:2:3: internal compiler error: in expand_asm_stmt, at cfgexpand.cc:3419
    2 |   asm volatile("" ::"m"((char (*)[l])a--));
      |   ^~~
0x238b15e internal_error(char const*, ...)
        ???:0
0xa11270 fancy_abort(char const*, int, char const*)
        ???:0
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.
Compiler returned: 1
```

Reply via email to