public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/99657] New: ICE: in extract_insn, at recog.c:2769 (error: unrecognizable insn)
@ 2021-03-19  7:26 asolokha at gmx dot com
  2021-03-19  8:11 ` [Bug target/99657] " rguenth at gcc dot gnu.org
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: asolokha at gmx dot com @ 2021-03-19  7:26 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 99657
           Summary: ICE: in extract_insn, at recog.c:2769 (error:
                    unrecognizable insn)
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: asolokha at gmx dot com
  Target Milestone: ---
            Target: aarch64-linux-gnu

gcc-11.0.1-alpha20210314 snapshot (g:c2d7c39fcb8a3cb67600cdb6fde49ecb0e951589)
ICEs when compiling
gcc/testsuite/c-c++-common/hwasan/handles-poly_int-marked-vars.c:

% aarch64-linux-gnu-gcc-11.0.1 -c
gcc/testsuite/c-c++-common/hwasan/handles-poly_int-marked-vars.c
gcc/testsuite/c-c++-common/hwasan/handles-poly_int-marked-vars.c: In function
'main':
gcc/testsuite/c-c++-common/hwasan/handles-poly_int-marked-vars.c:32:1: error:
unrecognizable insn:
   32 | }
      | ^
(insn 13 12 14 4 (set (reg:DI 98)
        (plus:DI (reg/f:DI 87 virtual-stack-vars)
            (const_poly_int:DI [-48, -16])))
"gcc/testsuite/c-c++-common/hwasan/handles-poly_int-marked-vars.c":26:11 -1
     (nil))
during RTL pass: vregs
gcc/testsuite/c-c++-common/hwasan/handles-poly_int-marked-vars.c:32:1: internal
compiler error: in extract_insn, at recog.c:2769
0x72ddb5 _fatal_insn(char const*, rtx_def const*, char const*, int, char
const*)
       
/var/tmp/portage/cross-aarch64-linux-gnu/gcc-11.0.1_alpha20210314/work/gcc-11-20210314/gcc/rtl-error.c:108
0x72ddd3 _fatal_insn_not_found(rtx_def const*, char const*, int, char const*)
       
/var/tmp/portage/cross-aarch64-linux-gnu/gcc-11.0.1_alpha20210314/work/gcc-11-20210314/gcc/rtl-error.c:116
0x72c78a extract_insn(rtx_insn*)
       
/var/tmp/portage/cross-aarch64-linux-gnu/gcc-11.0.1_alpha20210314/work/gcc-11-20210314/gcc/recog.c:2769
0xb6038e instantiate_virtual_regs_in_insn
       
/var/tmp/portage/cross-aarch64-linux-gnu/gcc-11.0.1_alpha20210314/work/gcc-11-20210314/gcc/function.c:1609
0xb6038e instantiate_virtual_regs
       
/var/tmp/portage/cross-aarch64-linux-gnu/gcc-11.0.1_alpha20210314/work/gcc-11-20210314/gcc/function.c:1983
0xb6038e execute
       
/var/tmp/portage/cross-aarch64-linux-gnu/gcc-11.0.1_alpha20210314/work/gcc-11-20210314/gcc/function.c:2032

It doesn't ICE when provided w/ -march containing "+sve".

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

* [Bug target/99657] ICE: in extract_insn, at recog.c:2769 (error: unrecognizable insn)
  2021-03-19  7:26 [Bug target/99657] New: ICE: in extract_insn, at recog.c:2769 (error: unrecognizable insn) asolokha at gmx dot com
@ 2021-03-19  8:11 ` rguenth at gcc dot gnu.org
  2021-11-09  0:23 ` pinskia at gcc dot gnu.org
                   ` (9 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: rguenth at gcc dot gnu.org @ 2021-03-19  8:11 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |ice-on-invalid-code

--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
I would say we should diagnose use of

      __SVInt8_t freq;

when +sve is not given and/or arm_sve.h is included.  The testcase specifies

/* { dg-additional-options "-march=armv8.6-a+sve
-fsanitize-address-use-after-scope" } */

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

* [Bug target/99657] ICE: in extract_insn, at recog.c:2769 (error: unrecognizable insn)
  2021-03-19  7:26 [Bug target/99657] New: ICE: in extract_insn, at recog.c:2769 (error: unrecognizable insn) asolokha at gmx dot com
  2021-03-19  8:11 ` [Bug target/99657] " rguenth at gcc dot gnu.org
@ 2021-11-09  0:23 ` pinskia at gcc dot gnu.org
  2021-11-09  0:41 ` pinskia at gcc dot gnu.org
                   ` (8 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-11-09  0:23 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |error-recovery
   Last reconfirmed|                            |2021-11-09
     Ever confirmed|0                           |1
             Status|UNCONFIRMED                 |NEW

--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
This is what I get on the trunk:
t.c: In function ‘main’:
t.c:26:11: error: this operation requires the SVE ISA extension
   26 |       if (__builtin_bcmp (&freq, a, 10))
      |           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
t.c:26:11: note: you can enable SVE using the command-line option ‘-march’, or
by using the ‘target’ attribute or pragma
during RTL pass: expand
t.c:26:11: internal compiler error: Segmentation fault
0xd89133 crash_signal
        /home/ubuntu/src/upstream-gcc-aarch64/gcc/gcc/toplev.c:322
0x9a8734 single_set(rtx_insn const*)
        /home/ubuntu/src/upstream-gcc-aarch64/gcc/gcc/rtl.h:3585
0x9a8734 emit_move_insn(rtx_def*, rtx_def*)
        /home/ubuntu/src/upstream-gcc-aarch64/gcc/gcc/expr.c:4131
0x97b63f force_reg(machine_mode, rtx_def*)
        /home/ubuntu/src/upstream-gcc-aarch64/gcc/gcc/explow.c:678
0x159402b gen_adddi3(rtx_def*, rtx_def*, rtx_def*)
       
/home/ubuntu/src/upstream-gcc-aarch64/gcc/gcc/config/aarch64/aarch64.md:1960
0xc5e3eb expand_binop_directly
        /home/ubuntu/src/upstream-gcc-aarch64/gcc/gcc/optabs.c:1431
0xc5c42b expand_binop(machine_mode, optab_tag, rtx_def*, rtx_def*, rtx_def*,
int, optab_methods)
        /home/ubuntu/src/upstream-gcc-aarch64/gcc/gcc/optabs.c:1518
0x9a1f6f expand_expr_addr_expr
        /home/ubuntu/src/upstream-gcc-aarch64/gcc/gcc/expr.c:8551
0x9a1f6f expand_expr_real_1(tree_node*, rtx_def*, machine_mode,
expand_modifier, rtx_def**, bool)
        /home/ubuntu/src/upstream-gcc-aarch64/gcc/gcc/expr.c:11767
0x836c57 expand_expr
        /home/ubuntu/src/upstream-gcc-aarch64/gcc/gcc/expr.h:301
0x836c57 get_memory_rtx(tree_node*, tree_node*)
        /home/ubuntu/src/upstream-gcc-aarch64/gcc/gcc/builtins.c:1368
0x837b77 expand_builtin_memcmp
        /home/ubuntu/src/upstream-gcc-aarch64/gcc/gcc/builtins.c:4284
0x844f9b expand_builtin(tree_node*, rtx_def*, rtx_def*, machine_mode, int)
        /home/ubuntu/src/upstream-gcc-aarch64/gcc/gcc/builtins.c:7267
0x9a3f8f expand_expr_real_1(tree_node*, rtx_def*, machine_mode,
expand_modifier, rtx_def**, bool)
        /home/ubuntu/src/upstream-gcc-aarch64/gcc/gcc/expr.c:11536
0x9b050b store_expr(tree_node*, rtx_def*, int, bool, bool)
        /home/ubuntu/src/upstream-gcc-aarch64/gcc/gcc/expr.c:6090
0x9b3637 expand_assignment(tree_node*, tree_node*, bool)
        /home/ubuntu/src/upstream-gcc-aarch64/gcc/gcc/expr.c:5822
0x86bae3 expand_call_stmt
        /home/ubuntu/src/upstream-gcc-aarch64/gcc/gcc/cfgexpand.c:2841
0x86bae3 expand_gimple_stmt_1
        /home/ubuntu/src/upstream-gcc-aarch64/gcc/gcc/cfgexpand.c:3876
0x86bae3 expand_gimple_stmt
        /home/ubuntu/src/upstream-gcc-aarch64/gcc/gcc/cfgexpand.c:4040
0x8729f7 expand_gimple_basic_block
        /home/ubuntu/src/upstream-gcc-aarch64/gcc/gcc/cfgexpand.c:6085
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.

This changed in GCC 10.3 and GCC 11.1.0.

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

* [Bug target/99657] ICE: in extract_insn, at recog.c:2769 (error: unrecognizable insn)
  2021-03-19  7:26 [Bug target/99657] New: ICE: in extract_insn, at recog.c:2769 (error: unrecognizable insn) asolokha at gmx dot com
  2021-03-19  8:11 ` [Bug target/99657] " rguenth at gcc dot gnu.org
  2021-11-09  0:23 ` pinskia at gcc dot gnu.org
@ 2021-11-09  0:41 ` pinskia at gcc dot gnu.org
  2021-11-09  1:12 ` pinskia at gcc dot gnu.org
                   ` (7 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-11-09  0:41 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
           Assignee|unassigned at gcc dot gnu.org      |pinskia at gcc dot gnu.org

--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
I have a simple patch which solves the ICE after error.

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

* [Bug target/99657] ICE: in extract_insn, at recog.c:2769 (error: unrecognizable insn)
  2021-03-19  7:26 [Bug target/99657] New: ICE: in extract_insn, at recog.c:2769 (error: unrecognizable insn) asolokha at gmx dot com
                   ` (2 preceding siblings ...)
  2021-11-09  0:41 ` pinskia at gcc dot gnu.org
@ 2021-11-09  1:12 ` pinskia at gcc dot gnu.org
  2021-11-09  2:31 ` pinskia at gcc dot gnu.org
                   ` (6 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-11-09  1:12 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

* [Bug target/99657] ICE: in extract_insn, at recog.c:2769 (error: unrecognizable insn)
  2021-03-19  7:26 [Bug target/99657] New: ICE: in extract_insn, at recog.c:2769 (error: unrecognizable insn) asolokha at gmx dot com
                   ` (3 preceding siblings ...)
  2021-11-09  1:12 ` pinskia at gcc dot gnu.org
@ 2021-11-09  2:31 ` pinskia at gcc dot gnu.org
  2021-11-09  2:55 ` pinskia at gcc dot gnu.org
                   ` (5 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-11-09  2:31 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
The easiest way to fixing this is to call verify_type_context even for the decl
with auto storage too and reject it then.  I think I am going to do that.

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

* [Bug target/99657] ICE: in extract_insn, at recog.c:2769 (error: unrecognizable insn)
  2021-03-19  7:26 [Bug target/99657] New: ICE: in extract_insn, at recog.c:2769 (error: unrecognizable insn) asolokha at gmx dot com
                   ` (4 preceding siblings ...)
  2021-11-09  2:31 ` pinskia at gcc dot gnu.org
@ 2021-11-09  2:55 ` pinskia at gcc dot gnu.org
  2021-11-09  2:57 ` pinskia at gcc dot gnu.org
                   ` (4 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-11-09  2:55 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #6 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Created attachment 51751
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=51751&action=edit
Patch which fixes the C side of things

This is the start of the patch which will fix this.  It fixes C front-end. The
C++ front-end I have to audit all uses of verify_type_context to add the auto
storage part.  Also I still need to make sure argument passing is also rejected
too.

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

* [Bug target/99657] ICE: in extract_insn, at recog.c:2769 (error: unrecognizable insn)
  2021-03-19  7:26 [Bug target/99657] New: ICE: in extract_insn, at recog.c:2769 (error: unrecognizable insn) asolokha at gmx dot com
                   ` (5 preceding siblings ...)
  2021-11-09  2:55 ` pinskia at gcc dot gnu.org
@ 2021-11-09  2:57 ` pinskia at gcc dot gnu.org
  2021-11-09  4:54 ` pinskia at gcc dot gnu.org
                   ` (3 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-11-09  2:57 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #7 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Andrew Pinski from comment #6)
> Created attachment 51751 [details]
> Patch which fixes the C side of things
> 
> This is the start of the patch which will fix this.  It fixes C front-end.
> The C++ front-end I have to audit all uses of verify_type_context to add the
> auto storage part.  Also I still need to make sure argument passing is also
> rejected too.

It does not fix the pointer case though.

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

* [Bug target/99657] ICE: in extract_insn, at recog.c:2769 (error: unrecognizable insn)
  2021-03-19  7:26 [Bug target/99657] New: ICE: in extract_insn, at recog.c:2769 (error: unrecognizable insn) asolokha at gmx dot com
                   ` (6 preceding siblings ...)
  2021-11-09  2:57 ` pinskia at gcc dot gnu.org
@ 2021-11-09  4:54 ` pinskia at gcc dot gnu.org
  2021-11-09 10:10 ` pinskia at gcc dot gnu.org
                   ` (2 subsequent siblings)
  10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-11-09  4:54 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #51751|0                           |1
        is obsolete|                            |

--- Comment #8 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Created attachment 51753
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=51753&action=edit
New patch

Here is a new patch which fixes up the issue more.
And adds the new testcase and such.

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

* [Bug target/99657] ICE: in extract_insn, at recog.c:2769 (error: unrecognizable insn)
  2021-03-19  7:26 [Bug target/99657] New: ICE: in extract_insn, at recog.c:2769 (error: unrecognizable insn) asolokha at gmx dot com
                   ` (7 preceding siblings ...)
  2021-11-09  4:54 ` pinskia at gcc dot gnu.org
@ 2021-11-09 10:10 ` pinskia at gcc dot gnu.org
  2021-11-12 15:39 ` [Bug target/99657] ICE: in extract_insn, at recog.c:2769 with SVE code without -march=+sve pinskia at gcc dot gnu.org
  2022-10-29 19:46 ` pinskia at gcc dot gnu.org
  10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-11-09 10:10 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
                URL|                            |https://gcc.gnu.org/piperma
                   |                            |il/gcc-patches/2021-Novembe
                   |                            |r/583786.html
           Keywords|                            |patch

--- Comment #9 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Patch submitted:
https://gcc.gnu.org/pipermail/gcc-patches/2021-November/583786.html

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

* [Bug target/99657] ICE: in extract_insn, at recog.c:2769 with SVE code without -march=+sve
  2021-03-19  7:26 [Bug target/99657] New: ICE: in extract_insn, at recog.c:2769 (error: unrecognizable insn) asolokha at gmx dot com
                   ` (8 preceding siblings ...)
  2021-11-09 10:10 ` pinskia at gcc dot gnu.org
@ 2021-11-12 15:39 ` pinskia at gcc dot gnu.org
  2022-10-29 19:46 ` pinskia at gcc dot gnu.org
  10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-11-12 15:39 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

* [Bug target/99657] ICE: in extract_insn, at recog.c:2769 with SVE code without -march=+sve
  2021-03-19  7:26 [Bug target/99657] New: ICE: in extract_insn, at recog.c:2769 (error: unrecognizable insn) asolokha at gmx dot com
                   ` (9 preceding siblings ...)
  2021-11-12 15:39 ` [Bug target/99657] ICE: in extract_insn, at recog.c:2769 with SVE code without -march=+sve pinskia at gcc dot gnu.org
@ 2022-10-29 19:46 ` pinskia at gcc dot gnu.org
  10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu.org @ 2022-10-29 19:46 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

end of thread, other threads:[~2022-10-29 19:46 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-19  7:26 [Bug target/99657] New: ICE: in extract_insn, at recog.c:2769 (error: unrecognizable insn) asolokha at gmx dot com
2021-03-19  8:11 ` [Bug target/99657] " rguenth at gcc dot gnu.org
2021-11-09  0:23 ` pinskia at gcc dot gnu.org
2021-11-09  0:41 ` pinskia at gcc dot gnu.org
2021-11-09  1:12 ` pinskia at gcc dot gnu.org
2021-11-09  2:31 ` pinskia at gcc dot gnu.org
2021-11-09  2:55 ` pinskia at gcc dot gnu.org
2021-11-09  2:57 ` pinskia at gcc dot gnu.org
2021-11-09  4:54 ` pinskia at gcc dot gnu.org
2021-11-09 10:10 ` pinskia at gcc dot gnu.org
2021-11-12 15:39 ` [Bug target/99657] ICE: in extract_insn, at recog.c:2769 with SVE code without -march=+sve pinskia at gcc dot gnu.org
2022-10-29 19:46 ` 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).