public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/92469] ICE: output_operand: invalid use of register 'frame' in 7/8/9/10
       [not found] <bug-92469-4@http.gcc.gnu.org/bugzilla/>
@ 2020-03-12 11:58 ` jakub at gcc dot gnu.org
  2020-05-04  8:52 ` pinskia at gcc dot gnu.org
                   ` (8 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: jakub at gcc dot gnu.org @ 2020-03-12 11:58 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|9.3                         |9.4

--- Comment #7 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
GCC 9.3.0 has been released, adjusting target milestone.

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

* [Bug target/92469] ICE: output_operand: invalid use of register 'frame' in 7/8/9/10
       [not found] <bug-92469-4@http.gcc.gnu.org/bugzilla/>
  2020-03-12 11:58 ` [Bug target/92469] ICE: output_operand: invalid use of register 'frame' in 7/8/9/10 jakub at gcc dot gnu.org
@ 2020-05-04  8:52 ` pinskia at gcc dot gnu.org
  2020-05-04  9:12 ` jakub at gcc dot gnu.org
                   ` (7 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: pinskia at gcc dot gnu.org @ 2020-05-04  8:52 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #8 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
*** Bug 94902 has been marked as a duplicate of this bug. ***

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

* [Bug target/92469] ICE: output_operand: invalid use of register 'frame' in 7/8/9/10
       [not found] <bug-92469-4@http.gcc.gnu.org/bugzilla/>
  2020-03-12 11:58 ` [Bug target/92469] ICE: output_operand: invalid use of register 'frame' in 7/8/9/10 jakub at gcc dot gnu.org
  2020-05-04  8:52 ` pinskia at gcc dot gnu.org
@ 2020-05-04  9:12 ` jakub at gcc dot gnu.org
  2020-05-05  9:07   ` Richard Sandiford
  2020-05-05  9:07 ` rsandifo at gcc dot gnu.org
                   ` (6 subsequent siblings)
  9 siblings, 1 reply; 11+ messages in thread
From: jakub at gcc dot gnu.org @ 2020-05-04  9:12 UTC (permalink / raw)
  To: gcc-bugs

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

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jakub at gcc dot gnu.org

--- Comment #9 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Seems neither accessible_reg_set nor operand_reg_set can exclude frame, because
the latter results in general_operand predicate failing for it and the former
results into the latter not being enabled either.
So, if we wanted to reject this right away, we'd have to add another hard reg
set (e.g. containing gcc internal artifical regs that shouldn't appear in asm
register specification), or a target hook that would reject such registers that
varasm.c would call.

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

* Re: [Bug target/92469] ICE: output_operand: invalid use of register 'frame' in 7/8/9/10
  2020-05-04  9:12 ` jakub at gcc dot gnu.org
@ 2020-05-05  9:07   ` Richard Sandiford
  0 siblings, 0 replies; 11+ messages in thread
From: Richard Sandiford @ 2020-05-05  9:07 UTC (permalink / raw)
  To: jakub at gcc dot gnu.org; +Cc: gcc-bugs

"jakub at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> writes:
> --- Comment #9 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
> Seems neither accessible_reg_set nor operand_reg_set can exclude frame, because
> the latter results in general_operand predicate failing for it and the former
> results into the latter not being enabled either.
> So, if we wanted to reject this right away, we'd have to add another hard reg
> set (e.g. containing gcc internal artifical regs that shouldn't appear in asm
> register specification), or a target hook that would reject such registers that
> varasm.c would call.

Agree a hard reg set would be good.  We should be able to fill in
the easy cases automatically, e.g. FRAME_POINTER_REGNUM when it's
!= HARD_FRAME_POINTER_REGNUM.  But some cases would still need
target help.


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

* [Bug target/92469] ICE: output_operand: invalid use of register 'frame' in 7/8/9/10
       [not found] <bug-92469-4@http.gcc.gnu.org/bugzilla/>
                   ` (2 preceding siblings ...)
  2020-05-04  9:12 ` jakub at gcc dot gnu.org
@ 2020-05-05  9:07 ` rsandifo at gcc dot gnu.org
  2020-12-08 16:38 ` ubizjak at gmail dot com
                   ` (5 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: rsandifo at gcc dot gnu.org @ 2020-05-05  9:07 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #10 from rsandifo at gcc dot gnu.org <rsandifo at gcc dot gnu.org> ---
"jakub at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> writes:
> --- Comment #9 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
> Seems neither accessible_reg_set nor operand_reg_set can exclude frame, because
> the latter results in general_operand predicate failing for it and the former
> results into the latter not being enabled either.
> So, if we wanted to reject this right away, we'd have to add another hard reg
> set (e.g. containing gcc internal artifical regs that shouldn't appear in asm
> register specification), or a target hook that would reject such registers that
> varasm.c would call.

Agree a hard reg set would be good.  We should be able to fill in
the easy cases automatically, e.g. FRAME_POINTER_REGNUM when it's
!= HARD_FRAME_POINTER_REGNUM.  But some cases would still need
target help.

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

* [Bug target/92469] ICE: output_operand: invalid use of register 'frame' in 7/8/9/10
       [not found] <bug-92469-4@http.gcc.gnu.org/bugzilla/>
                   ` (3 preceding siblings ...)
  2020-05-05  9:07 ` rsandifo at gcc dot gnu.org
@ 2020-12-08 16:38 ` ubizjak at gmail dot com
  2020-12-09 12:44 ` jakub at gcc dot gnu.org
                   ` (4 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: ubizjak at gmail dot com @ 2020-12-08 16:38 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #11 from Uroš Bizjak <ubizjak at gmail dot com> ---
*** Bug 98194 has been marked as a duplicate of this bug. ***

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

* [Bug target/92469] ICE: output_operand: invalid use of register 'frame' in 7/8/9/10
       [not found] <bug-92469-4@http.gcc.gnu.org/bugzilla/>
                   ` (4 preceding siblings ...)
  2020-12-08 16:38 ` ubizjak at gmail dot com
@ 2020-12-09 12:44 ` jakub at gcc dot gnu.org
  2020-12-13 16:09 ` cvs-commit at gcc dot gnu.org
                   ` (3 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: jakub at gcc dot gnu.org @ 2020-12-09 12:44 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #12 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Created attachment 49713
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=49713&action=edit
gcc11-pr92469.patch

Untested fix.

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

* [Bug target/92469] ICE: output_operand: invalid use of register 'frame' in 7/8/9/10
       [not found] <bug-92469-4@http.gcc.gnu.org/bugzilla/>
                   ` (5 preceding siblings ...)
  2020-12-09 12:44 ` jakub at gcc dot gnu.org
@ 2020-12-13 16:09 ` cvs-commit at gcc dot gnu.org
  2021-06-01  8:15 ` rguenth at gcc dot gnu.org
                   ` (2 subsequent siblings)
  9 siblings, 0 replies; 11+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-12-13 16:09 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #13 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jakub Jelinek <jakub@gcc.gnu.org>:

https://gcc.gnu.org/g:d88e2cb54914cf8aa0ae68ca75dc45237acfcef0

commit r11-5972-gd88e2cb54914cf8aa0ae68ca75dc45237acfcef0
Author: Jakub Jelinek <jakub@redhat.com>
Date:   Sun Dec 13 17:08:08 2020 +0100

    varasm: Reject soft frame or arg pointer registers for register vars
[PR92469]

    The following patch rejects frame, argp and retarg registers (unless they
are equal
    to hard frame pointer registers or if they aren't eliminable) from local or
global
    register vars.
    These are just internal implementation details eliminated later into hard
    frame pointer or stack pointer and using them as register variable leads
    to numerous ICEs.

    2020-12-13  Jakub Jelinek  <jakub@redhat.com>

            PR target/92469
            * varasm.c (eliminable_regno_p): New function.
            (make_decl_rtl): Reject asm vars for frame and argp
            if they are different from hard frame pointer.

            * gcc.target/i386/pr92469.c: New test.
            * gcc.target/i386/pr79804.c: Adjust expected diagnostics.
            * gcc.target/i386/pr88178.c: Expect an error.

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

* [Bug target/92469] ICE: output_operand: invalid use of register 'frame' in 7/8/9/10
       [not found] <bug-92469-4@http.gcc.gnu.org/bugzilla/>
                   ` (6 preceding siblings ...)
  2020-12-13 16:09 ` cvs-commit at gcc dot gnu.org
@ 2021-06-01  8:15 ` rguenth at gcc dot gnu.org
  2021-06-11 20:09 ` hjl.tools at gmail dot com
  2022-05-27  8:39 ` rguenth at gcc dot gnu.org
  9 siblings, 0 replies; 11+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-06-01  8:15 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|9.4                         |9.5

--- Comment #14 from Richard Biener <rguenth at gcc dot gnu.org> ---
GCC 9.4 is being released, retargeting bugs to GCC 9.5.

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

* [Bug target/92469] ICE: output_operand: invalid use of register 'frame' in 7/8/9/10
       [not found] <bug-92469-4@http.gcc.gnu.org/bugzilla/>
                   ` (7 preceding siblings ...)
  2021-06-01  8:15 ` rguenth at gcc dot gnu.org
@ 2021-06-11 20:09 ` hjl.tools at gmail dot com
  2022-05-27  8:39 ` rguenth at gcc dot gnu.org
  9 siblings, 0 replies; 11+ messages in thread
From: hjl.tools at gmail dot com @ 2021-06-11 20:09 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #15 from H.J. Lu <hjl.tools at gmail dot com> ---
This isn't completely fixed:

[hjl@gnu-clx-1 gcc]$ ./xgcc -B./
/export/gnu/import/git/sources/gcc/gcc/testsuite/gcc.target/i386/pr97032.c -m32
-fdiagnostics-plain-output -O2 -mincoming-stack-boundary=2
-fstack-protector-all -ffat-lto-objects -fno-ident -S -o pr97032.s -mtune=k8
/export/gnu/import/git/sources/gcc/gcc/testsuite/gcc.target/i386/pr97032.c: In
function ??sys_socketcall??:
/export/gnu/import/git/sources/gcc/gcc/testsuite/gcc.target/i386/pr97032.c:14:3:
warning: listing the stack pointer register ??esp?? in a clobber list is
deprecated [-Wdeprecated]
/export/gnu/import/git/sources/gcc/gcc/testsuite/gcc.target/i386/pr97032.c:14:3:
note: the value of the stack pointer after an ??asm?? statement must be the
same as it was before the statement
during RTL pass: final
/export/gnu/import/git/sources/gcc/gcc/testsuite/gcc.target/i386/pr97032.c:21:1:
internal compiler error: output_operand: invalid use of register 'frame'
0xad9216 output_operand_lossage(char const*, ...)
        /export/gnu/import/git/sources/gcc/gcc/final.c:3235
0x11b16c4 ix86_print_operand_address_as
        /export/gnu/import/git/sources/gcc/gcc/config/i386/i386.c:13698
0xad9531 output_operand(rtx_def*, int)
        /export/gnu/import/git/sources/gcc/gcc/final.c:3677
0xada075 output_asm_insn(char const*, rtx_def**)
        /export/gnu/import/git/sources/gcc/gcc/final.c:3589
0x170edad output_1175
        /export/gnu/import/git/sources/gcc/gcc/config/i386/i386.md:20907
0xadd898 final_scan_insn_1
        /export/gnu/import/git/sources/gcc/gcc/final.c:2827
0xaddd6b final_scan_insn(rtx_insn*, _IO_FILE*, int, int, int*)
        /export/gnu/import/git/sources/gcc/gcc/final.c:2940
0xadde47 final_1
        /export/gnu/import/git/sources/gcc/gcc/final.c:1997
0xade9e4 rest_of_handle_final
        /export/gnu/import/git/sources/gcc/gcc/final.c:4285
0xade9e4 execute
        /export/gnu/import/git/sources/gcc/gcc/final.c:4363
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.
[hjl@gnu-clx-1 gcc]$

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

* [Bug target/92469] ICE: output_operand: invalid use of register 'frame' in 7/8/9/10
       [not found] <bug-92469-4@http.gcc.gnu.org/bugzilla/>
                   ` (8 preceding siblings ...)
  2021-06-11 20:09 ` hjl.tools at gmail dot com
@ 2022-05-27  8:39 ` rguenth at gcc dot gnu.org
  9 siblings, 0 replies; 11+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-05-27  8:39 UTC (permalink / raw)
  To: gcc-bugs

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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|9.5                         |---

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

end of thread, other threads:[~2022-05-27  8:39 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-92469-4@http.gcc.gnu.org/bugzilla/>
2020-03-12 11:58 ` [Bug target/92469] ICE: output_operand: invalid use of register 'frame' in 7/8/9/10 jakub at gcc dot gnu.org
2020-05-04  8:52 ` pinskia at gcc dot gnu.org
2020-05-04  9:12 ` jakub at gcc dot gnu.org
2020-05-05  9:07   ` Richard Sandiford
2020-05-05  9:07 ` rsandifo at gcc dot gnu.org
2020-12-08 16:38 ` ubizjak at gmail dot com
2020-12-09 12:44 ` jakub at gcc dot gnu.org
2020-12-13 16:09 ` cvs-commit at gcc dot gnu.org
2021-06-01  8:15 ` rguenth at gcc dot gnu.org
2021-06-11 20:09 ` hjl.tools at gmail dot com
2022-05-27  8:39 ` rguenth 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).