public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/97992] New: ICE in subst_asm_stack_regs, at reg-stack.c:2264
@ 2020-11-25 17:04 gscfq@t-online.de
  2020-11-25 17:12 ` [Bug c/97992] " ubizjak at gmail dot com
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: gscfq@t-online.de @ 2020-11-25 17:04 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 97992
           Summary: ICE in subst_asm_stack_regs, at reg-stack.c:2264
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: gscfq@t-online.de
  Target Milestone: ---

Affects versions down to at least r5 :


$ cat z1.c
long double
f (long double x)
{
  double r;
  asm volatile ("fsqrt" : "=t"(r) : ""(x));
  return f (x * x);
}


$ gcc-11-20201122 -c z1.c -O2
during RTL pass: stack
z1.c: In function 'f':
z1.c:7:1: internal compiler error: in subst_asm_stack_regs, at reg-stack.c:2264
    7 | }
      | ^
0xabde0e subst_asm_stack_regs
        ../../gcc/reg-stack.c:2264
0xabf8ad subst_stack_regs
        ../../gcc/reg-stack.c:2425
0xabfc27 convert_regs_1
        ../../gcc/reg-stack.c:3080
0xabfc27 convert_regs_2
        ../../gcc/reg-stack.c:3214
0xac0ddd convert_regs
        ../../gcc/reg-stack.c:3249
0xac0ddd reg_to_stack
        ../../gcc/reg-stack.c:3374
0xac0ddd rest_of_handle_stack_regs
        ../../gcc/reg-stack.c:3429
0xac0ddd execute
        ../../gcc/reg-stack.c:3460

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

* [Bug c/97992] ICE in subst_asm_stack_regs, at reg-stack.c:2264
  2020-11-25 17:04 [Bug c/97992] New: ICE in subst_asm_stack_regs, at reg-stack.c:2264 gscfq@t-online.de
@ 2020-11-25 17:12 ` ubizjak at gmail dot com
  2020-12-01 17:50 ` gscfq@t-online.de
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: ubizjak at gmail dot com @ 2020-11-25 17:12 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from Uroš Bizjak <ubizjak at gmail dot com> ---
This is expected with invalid asm.

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

* [Bug c/97992] ICE in subst_asm_stack_regs, at reg-stack.c:2264
  2020-11-25 17:04 [Bug c/97992] New: ICE in subst_asm_stack_regs, at reg-stack.c:2264 gscfq@t-online.de
  2020-11-25 17:12 ` [Bug c/97992] " ubizjak at gmail dot com
@ 2020-12-01 17:50 ` gscfq@t-online.de
  2020-12-01 20:25 ` [Bug target/97992] " pinskia at gcc dot gnu.org
  2021-12-29  0:58 ` pinskia at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: gscfq@t-online.de @ 2020-12-01 17:50 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from G. Steinmetz <gscfq@t-online.de> ---

Presumably related :


$ cat z2.c
long double
f (long double x)
{
  asm ("fsqrt" :: ""(x));
  return 1.0 - x;
}


$ cat z5.c
double
foo (double a)
{
  for (int i=0; i<4; i++)
  {
    asm ("mov %1" : "=&t"(a) : ""(a));
  }
  return a;
}


$ gcc-11-20201129 -c z2.c -O2
during RTL pass: stack
z2.c: In function 'f':
z2.c:6:1: internal compiler error: in change_stack, at reg-stack.c:2646
    6 | }
      | ^
0xac4218 change_stack
        ../../gcc/reg-stack.c:2646
0xac44ec subst_asm_stack_regs
        ../../gcc/reg-stack.c:2254
0xac655d subst_stack_regs
        ../../gcc/reg-stack.c:2425
0xac68d7 convert_regs_1
        ../../gcc/reg-stack.c:3080
0xac68d7 convert_regs_2
        ../../gcc/reg-stack.c:3214
0xac7a8d convert_regs
        ../../gcc/reg-stack.c:3249
0xac7a8d reg_to_stack
        ../../gcc/reg-stack.c:3374
0xac7a8d rest_of_handle_stack_regs
        ../../gcc/reg-stack.c:3429
0xac7a8d execute
        ../../gcc/reg-stack.c:3460

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

* [Bug target/97992] ICE in subst_asm_stack_regs, at reg-stack.c:2264
  2020-11-25 17:04 [Bug c/97992] New: ICE in subst_asm_stack_regs, at reg-stack.c:2264 gscfq@t-online.de
  2020-11-25 17:12 ` [Bug c/97992] " ubizjak at gmail dot com
  2020-12-01 17:50 ` gscfq@t-online.de
@ 2020-12-01 20:25 ` pinskia at gcc dot gnu.org
  2021-12-29  0:58 ` pinskia at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu.org @ 2020-12-01 20:25 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Depends on|                            |69899

--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Most likely 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] 5+ messages in thread

* [Bug target/97992] ICE in subst_asm_stack_regs, at reg-stack.c:2264
  2020-11-25 17:04 [Bug c/97992] New: ICE in subst_asm_stack_regs, at reg-stack.c:2264 gscfq@t-online.de
                   ` (2 preceding siblings ...)
  2020-12-01 20:25 ` [Bug target/97992] " pinskia at gcc dot gnu.org
@ 2021-12-29  0:58 ` pinskia at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-12-29  0:58 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |DUPLICATE
             Status|UNCONFIRMED                 |RESOLVED

--- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Dup of bug 69899.

*** This bug has been marked as a duplicate of bug 69899 ***

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

end of thread, other threads:[~2021-12-29  0:58 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-25 17:04 [Bug c/97992] New: ICE in subst_asm_stack_regs, at reg-stack.c:2264 gscfq@t-online.de
2020-11-25 17:12 ` [Bug c/97992] " ubizjak at gmail dot com
2020-12-01 17:50 ` gscfq@t-online.de
2020-12-01 20:25 ` [Bug target/97992] " pinskia at gcc dot gnu.org
2021-12-29  0:58 ` 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).