public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/110667] New: gcc-14, ICE: internal compiler error: in replace_reg, at reg-stack.cc:722
@ 2023-07-14 14:15 141242068 at smail dot nju.edu.cn
  2023-07-14 15:25 ` [Bug middle-end/110667] " pinskia at gcc dot gnu.org
  0 siblings, 1 reply; 2+ messages in thread
From: 141242068 at smail dot nju.edu.cn @ 2023-07-14 14:15 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 110667
           Summary: gcc-14, ICE: internal compiler error: in replace_reg,
                    at reg-stack.cc:722
           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: ---

When compiling below program using gcc-14 with option `gcc-14 -Ofast a.c`,
gcc-14 crashes:
```
#include <assert.h>
#include <stdint.h>

void f() {
  long double res = 0;
  asm("" : "=&f"(res) : "f"(40.), "f"(2.));
  assert(res == 42.);
}
```

GCC's output is pasted below:
```
<source>: In function 'f':
<source>:6:3: error: output constraint 0 must specify a single register
    6 |   asm("" : "=&f"(res) : "f"(40.), "f"(2.));
      |   ^~~
during RTL pass: stack
<source>:8:1: internal compiler error: in replace_reg, at reg-stack.cc:722
    8 | }
      | ^
0x214e13e internal_error(char const*, ...)
        ???:0
0x9cd8e8 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.
```

This can be verified by visiting the Compiler Explorer:
https://gcc.godbolt.org/z/cbYGeaze8

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [Bug middle-end/110667] gcc-14, ICE: internal compiler error: in replace_reg, at reg-stack.cc:722
  2023-07-14 14:15 [Bug c/110667] New: gcc-14, ICE: internal compiler error: in replace_reg, at reg-stack.cc:722 141242068 at smail dot nju.edu.cn
@ 2023-07-14 15:25 ` pinskia at gcc dot gnu.org
  0 siblings, 0 replies; 2+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-07-14 15:25 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
     Ever confirmed|0                           |1
   Last reconfirmed|                            |2023-07-14
         Depends on|                            |69899
             Status|UNCONFIRMED                 |NEW

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Confirmed. All GCC I can get my hands on have ICEd (even though most hide it
with "confused by earlier errors, bailing out").


`-O2 -ffinite-math-only` is enough to reproduce the ICE. So I almost think this
is a dup of bug 69899 .


Referenced Bugs:

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69899
[Bug 69899] gcc ICE on invalid code on x86_64-linux-gnu in "replace_reg"

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-07-14 15:25 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-14 14:15 [Bug c/110667] New: gcc-14, ICE: internal compiler error: in replace_reg, at reg-stack.cc:722 141242068 at smail dot nju.edu.cn
2023-07-14 15:25 ` [Bug middle-end/110667] " pinskia at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).