Bug 112500 - GCC: 14: internal compiler error: in expand_asm_stmt, at cfgexpand.cc:3419
Summary: GCC: 14: internal compiler error: in expand_asm_stmt, at cfgexpand.cc:3419
Status: UNCONFIRMED
Alias: None
Product: gcc
Classification: Unclassified
Component: middle-end (show other bugs)
Version: 14.0
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords: inline-asm
Depends on:
Blocks:
 
Reported: 2023-11-13 02:38 UTC by wierton
Modified: 2023-11-13 02:44 UTC (History)
0 users

See Also:
Host:
Target:
Build:
Known to work: 6.4.0
Known to fail: 7.1.0
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description wierton 2023-11-13 02:38:16 UTC
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
```