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

            Bug ID: 111817
           Summary: GCC: 14: internal compiler error: in expand_asm_stmt,
                    at cfgexpand.cc:3389
           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: ---

The bug triggering program:
```
static int foo(int x, int y, int z) {
  int b;
  asm("" : "=a"(b), "\n=&d"(x) : "0"(y), "1"(x), "mr"(z));
  return x;
}
```

The crash can be verfied at link: https://godbolt.org/z/6d7csd8xv

The full stack dump:
```
<source>: In function 'foo':
<source>:3:3: warning: output constraint '=' for operand 1 is not at the
beginning
    3 |   asm("" : "=a"(b), "\n=&d"(x) : "0"(y), "1"(x), "mr"(z));
      |   ^~~
<source>:3:3: warning: output constraint '=' for operand 1 is not at the
beginning
<source>:1:12: warning: output constraint '=' for operand 1 is not at the
beginning
    1 | static int foo(int x, int y, int z) {
      |            ^~~
<source>:1:12: warning: output constraint '=' for operand 1 is not at the
beginning
<source>:1:12: warning: output constraint '=' for operand 1 is not at the
beginning
<source>:1:12: warning: output constraint '=' for operand 1 is not at the
beginning
<source>:1:12: warning: output constraint '=' for operand 1 is not at the
beginning
<source>:1:12: warning: output constraint '=' for operand 1 is not at the
beginning
<source>:1:12: warning: output constraint '=' for operand 1 is not at the
beginning
<source>:1:12: warning: output constraint '=' for operand 1 is not at the
beginning
<source>:1:12: warning: output constraint '=' for operand 1 is not at the
beginning
<source>:5:1: warning: output constraint '=' for operand 1 is not at the
beginning
    5 | }
      | ^
<source>:5:1: warning: output constraint '=' for operand 1 is not at the
beginning
<source>:5:1: warning: output constraint '=' for operand 1 is not at the
beginning
<source>:5:1: warning: output constraint '=' for operand 1 is not at the
beginning
<source>:5:1: warning: output constraint '=' for operand 1 is not at the
beginning
<source>:5:1: warning: output constraint '=' for operand 1 is not at the
beginning
<source>:5:1: warning: output constraint '=' for operand 1 is not at the
beginning
<source>:5:1: warning: output constraint '=' for operand 1 is not at the
beginning
<source>:5:1: warning: output constraint '=' for operand 1 is not at the
beginning
<source>:5:1: warning: output constraint '=' for operand 1 is not at the
beginning
<source>:5:1: warning: output constraint '=' for operand 1 is not at the
beginning
<source>:5:1: warning: output constraint '=' for operand 1 is not at the
beginning
<source>:5:1: warning: output constraint '=' for operand 1 is not at the
beginning
<source>:5:1: warning: output constraint '=' for operand 1 is not at the
beginning
<source>:5:1: warning: output constraint '=' for operand 1 is not at the
beginning
<source>:5:1: warning: output constraint '=' for operand 1 is not at the
beginning
<source>:5:1: warning: output constraint '=' for operand 1 is not at the
beginning
<source>:5:1: warning: output constraint '=' for operand 1 is not at the
beginning
<source>:5:1: warning: output constraint '=' for operand 1 is not at the
beginning
<source>:5:1: warning: output constraint '=' for operand 1 is not at the
beginning
<source>:5:1: warning: output constraint '=' for operand 1 is not at the
beginning
<source>:5:1: warning: output constraint '=' for operand 1 is not at the
beginning
<source>:5:1: warning: output constraint '=' for operand 1 is not at the
beginning
<source>:5:1: warning: output constraint '=' for operand 1 is not at the
beginning
<source>:5:1: warning: output constraint '=' for operand 1 is not at the
beginning
<source>:5:1: warning: output constraint '=' for operand 1 is not at the
beginning
<source>:5:1: warning: output constraint '=' for operand 1 is not at the
beginning
<source>:5:1: warning: output constraint '=' for operand 1 is not at the
beginning
<source>:5:1: warning: output constraint '=' for operand 1 is not at the
beginning
<source>:5:1: warning: output constraint '=' for operand 1 is not at the
beginning
<source>:5:1: warning: output constraint '=' for operand 1 is not at the
beginning
<source>:5:1: warning: output constraint '=' for operand 1 is not at the
beginning
<source>:5:1: warning: output constraint '=' for operand 1 is not at the
beginning
<source>:5:1: warning: output constraint '=' for operand 1 is not at the
beginning
<source>:5:1: warning: output constraint '=' for operand 1 is not at the
beginning
<source>:5:1: warning: output constraint '=' for operand 1 is not at the
beginning
<source>:5:1: warning: output constraint '=' for operand 1 is not at the
beginning
<source>:5:1: warning: output constraint '=' for operand 1 is not at the
beginning
<source>:5:1: warning: output constraint '=' for operand 1 is not at the
beginning
<source>:5:1: warning: output constraint '=' for operand 1 is not at the
beginning
<source>:5:1: warning: output constraint '=' for operand 1 is not at the
beginning
<source>:5:1: warning: output constraint '=' for operand 1 is not at the
beginning
<source>:5:1: warning: output constraint '=' for operand 1 is not at the
beginning
<source>:5:1: warning: output constraint '=' for operand 1 is not at the
beginning
<source>:5:1: warning: output constraint '=' for operand 1 is not at the
beginning
<source>:5:1: warning: output constraint '=' for operand 1 is not at the
beginning
<source>:5:1: warning: output constraint '=' for operand 1 is not at the
beginning
<source>:5:1: warning: output constraint '=' for operand 1 is not at the
beginning
<source>:5:1: warning: output constraint '=' for operand 1 is not at the
beginning
<source>:5:1: warning: output constraint '=' for operand 1 is not at the
beginning
<source>:5:1: warning: output constraint '=' for operand 1 is not at the
beginning
<source>:5:1: warning: output constraint '=' for operand 1 is not at the
beginning
<source>:5:1: warning: output constraint '=' for operand 1 is not at the
beginning
<source>:5:1: warning: output constraint '=' for operand 1 is not at the
beginning
<source>:5:1: warning: output constraint '=' for operand 1 is not at the
beginning
<source>:5:1: warning: output constraint '=' for operand 1 is not at the
beginning
<source>:5:1: warning: output constraint '=' for operand 1 is not at the
beginning
<source>:5:1: warning: output constraint '=' for operand 1 is not at the
beginning
<source>:5:1: warning: output constraint '=' for operand 1 is not at the
beginning
<source>:5:1: warning: output constraint '=' for operand 1 is not at the
beginning
<source>:5:1: warning: output constraint '=' for operand 1 is not at the
beginning
<source>:5:1: warning: output constraint '=' for operand 1 is not at the
beginning
<source>:5:1: warning: output constraint '=' for operand 1 is not at the
beginning
<source>:5:1: warning: output constraint '=' for operand 1 is not at the
beginning
<source>:5:1: warning: output constraint '=' for operand 1 is not at the
beginning
<source>:5:1: warning: output constraint '=' for operand 1 is not at the
beginning
<source>:5:1: warning: output constraint '=' for operand 1 is not at the
beginning
<source>:5:1: warning: output constraint '=' for operand 1 is not at the
beginning
<source>:5:1: warning: output constraint '=' for operand 1 is not at the
beginning
<source>:1:12: warning: output constraint '=' for operand 1 is not at the
beginning
    1 | static int foo(int x, int y, int z) {
      |            ^~~
<source>:1:12: warning: output constraint '=' for operand 1 is not at the
beginning
<source>:1:12: warning: output constraint '=' for operand 1 is not at the
beginning
<source>:1:12: warning: output constraint '=' for operand 1 is not at the
beginning
<source>:1:12: warning: output constraint '=' for operand 1 is not at the
beginning
<source>:1:12: warning: output constraint '=' for operand 1 is not at the
beginning
<source>:1:12: warning: output constraint '=' for operand 1 is not at the
beginning
<source>:1:12: warning: output constraint '=' for operand 1 is not at the
beginning
<source>:1:12: warning: output constraint '=' for operand 1 is not at the
beginning
<source>:1:12: warning: output constraint '=' for operand 1 is not at the
beginning
<source>:1:12: warning: output constraint '=' for operand 1 is not at the
beginning
<source>:1:12: warning: output constraint '=' for operand 1 is not at the
beginning
<source>:1:12: warning: output constraint '=' for operand 1 is not at the
beginning
<source>:1:12: warning: output constraint '=' for operand 1 is not at the
beginning
<source>:1:12: warning: output constraint '=' for operand 1 is not at the
beginning
<source>:1:12: warning: output constraint '=' for operand 1 is not at the
beginning
<source>:1:12: warning: output constraint '=' for operand 1 is not at the
beginning
<source>:1:12: warning: output constraint '=' for operand 1 is not at the
beginning
<source>:1:12: warning: output constraint '=' for operand 1 is not at the
beginning
<source>:1:12: warning: output constraint '=' for operand 1 is not at the
beginning
<source>:1:12: warning: output constraint '=' for operand 1 is not at the
beginning
<source>:1:12: warning: output constraint '=' for operand 1 is not at the
beginning
<source>:1:12: warning: output constraint '=' for operand 1 is not at the
beginning
<source>:1:12: warning: output constraint '=' for operand 1 is not at the
beginning
<source>:1:12: warning: output constraint '=' for operand 1 is not at the
beginning
<source>:1:12: warning: output constraint '=' for operand 1 is not at the
beginning
<source>:1:12: warning: output constraint '=' for operand 1 is not at the
beginning
<source>:1:12: warning: output constraint '=' for operand 1 is not at the
beginning
<source>:3:3: warning: output constraint '=' for operand 1 is not at the
beginning
    3 |   asm("" : "=a"(b), "\n=&d"(x) : "0"(y), "1"(x), "mr"(z));
      |   ^~~
<source>:3:3: warning: output constraint '=' for operand 1 is not at the
beginning
<source>:3:3: error: invalid punctuation '\x0a' in constraint
during RTL pass: expand
<source>:3:3: internal compiler error: in expand_asm_stmt, at cfgexpand.cc:3389
0x22ff3ee internal_error(char const*, ...)
        ???:0
0x9fc0a8 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.
```

Reply via email to