public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/104002] New: ICE ‘verify_gimple’ failed since r12-1128-gef8176e0fac935c0
@ 2022-01-13  9:27 marxin at gcc dot gnu.org
  2022-01-13 10:17 ` [Bug tree-optimization/104002] " rguenth at gcc dot gnu.org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: marxin at gcc dot gnu.org @ 2022-01-13  9:27 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 104002
           Summary: ICE ‘verify_gimple’ failed since
                    r12-1128-gef8176e0fac935c0
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Keywords: ice-on-valid-code
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: marxin at gcc dot gnu.org
                CC: rguenth at gcc dot gnu.org
  Target Milestone: ---

Fails since introduction of the feature:

$ gcc
/home/marxin/Programming/gcc/gcc/testsuite/c-c++-common/builtin-shufflevector-3.c
-O2 -c
/home/marxin/Programming/gcc/gcc/testsuite/c-c++-common/builtin-shufflevector-3.c:
In function ‘foo’:
/home/marxin/Programming/gcc/gcc/testsuite/c-c++-common/builtin-shufflevector-3.c:16:1:
error: invalid RHS for gimple memory store: ‘bit_field_ref’
   16 | }
      | ^
D.1983

BIT_FIELD_REF <_1, 64, 0>;

# .MEM_4 = VDEF <.MEM_3(D)>
D.1983 = BIT_FIELD_REF <_1, 64, 0>;
during GIMPLE pass: ssa
/home/marxin/Programming/gcc/gcc/testsuite/c-c++-common/builtin-shufflevector-3.c:16:1:
internal compiler error: verify_gimple failed
0x1ee78a5 verify_gimple_in_cfg(function*, bool)
        /home/marxin/Programming/gcc/gcc/tree-cfg.c:5559
0x1d4149e execute_function_todo
        /home/marxin/Programming/gcc/gcc/passes.c:2084
0x1d41abb execute_todo
        /home/marxin/Programming/gcc/gcc/passes.c:2138
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.

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

* [Bug tree-optimization/104002] ICE ‘verify_gimple’ failed since r12-1128-gef8176e0fac935c0
  2022-01-13  9:27 [Bug tree-optimization/104002] New: ICE ‘verify_gimple’ failed since r12-1128-gef8176e0fac935c0 marxin at gcc dot gnu.org
@ 2022-01-13 10:17 ` rguenth at gcc dot gnu.org
  2022-01-13 10:30 ` rguenth at gcc dot gnu.org
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-01-13 10:17 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Assignee|unassigned at gcc dot gnu.org      |rguenth at gcc dot gnu.org
     Ever confirmed|0                           |1
   Last reconfirmed|                            |2022-01-13
             Status|UNCONFIRMED                 |ASSIGNED

--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
I'll have a look.

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

* [Bug tree-optimization/104002] ICE ‘verify_gimple’ failed since r12-1128-gef8176e0fac935c0
  2022-01-13  9:27 [Bug tree-optimization/104002] New: ICE ‘verify_gimple’ failed since r12-1128-gef8176e0fac935c0 marxin at gcc dot gnu.org
  2022-01-13 10:17 ` [Bug tree-optimization/104002] " rguenth at gcc dot gnu.org
@ 2022-01-13 10:30 ` rguenth at gcc dot gnu.org
  2022-01-13 15:07 ` cvs-commit at gcc dot gnu.org
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-01-13 10:30 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
Somewhat related to the recently fixed issue.  At -O0 we have invalid

  _1 = VEC_PERM_EXPR <v_2(D), v_2(D), { 2, 3, 2, 3 }>;
  _3 = BIT_FIELD_REF <_1, 64, 0>;
  _5 = VIEW_CONVERT_EXPR<int[2]>(_3)[i_4(D)];

while with -O update_address_taken is run and sets DECL_NOT_GIMPLE_REG_P (var),
leading to

  _1 = VEC_PERM_EXPR <v_2(D), v_2(D), { 2, 3, 2, 3 }>;
  D.1983 = BIT_FIELD_REF <_1, 64, 0>;
  _6 = VIEW_CONVERT_EXPR<int[2]>(D.1983)[i_5(D)];

note the non-register requirement is because of the variable index ARRAY_REF.
The decl should have been marked addressable but c_common_mark_addressable_vec
doesn't handle the TARGET_EXPR we build around the shufflevector result which
is the issue we have here.

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

* [Bug tree-optimization/104002] ICE ‘verify_gimple’ failed since r12-1128-gef8176e0fac935c0
  2022-01-13  9:27 [Bug tree-optimization/104002] New: ICE ‘verify_gimple’ failed since r12-1128-gef8176e0fac935c0 marxin at gcc dot gnu.org
  2022-01-13 10:17 ` [Bug tree-optimization/104002] " rguenth at gcc dot gnu.org
  2022-01-13 10:30 ` rguenth at gcc dot gnu.org
@ 2022-01-13 15:07 ` cvs-commit at gcc dot gnu.org
  2022-01-13 15:08 ` rguenth at gcc dot gnu.org
  2022-01-19  9:48 ` pinskia at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-01-13 15:07 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Richard Biener <rguenth@gcc.gnu.org>:

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

commit r12-6551-gf45a2232bc8d6b88f52859cac502611395f3caf5
Author: Richard Biener <rguenther@suse.de>
Date:   Thu Jan 13 11:55:14 2022 +0100

    c/104002 - shufflevector variable indexing

    Variable indexing of a __builtin_shufflevector result is broken because
    we fail to properly mark the TARGET_EXPR decl as addressable.

    2022-01-13  Richard Biener  <rguenther@suse.de>

            PR c/104002
    gcc/c-family/
            * c-common.c (c_common_mark_addressable_vec): Handle TARGET_EXPR.

    gcc/testsuite/
            * c-c++-common/builtin-shufflevector-3.c: Move ...
            * c-c++-common/torture/builtin-shufflevector-3.c: ... here.

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

* [Bug tree-optimization/104002] ICE ‘verify_gimple’ failed since r12-1128-gef8176e0fac935c0
  2022-01-13  9:27 [Bug tree-optimization/104002] New: ICE ‘verify_gimple’ failed since r12-1128-gef8176e0fac935c0 marxin at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2022-01-13 15:07 ` cvs-commit at gcc dot gnu.org
@ 2022-01-13 15:08 ` rguenth at gcc dot gnu.org
  2022-01-19  9:48 ` pinskia at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-01-13 15:08 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|---                         |FIXED

--- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> ---
Fixed.

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

* [Bug tree-optimization/104002] ICE ‘verify_gimple’ failed since r12-1128-gef8176e0fac935c0
  2022-01-13  9:27 [Bug tree-optimization/104002] New: ICE ‘verify_gimple’ failed since r12-1128-gef8176e0fac935c0 marxin at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2022-01-13 15:08 ` rguenth at gcc dot gnu.org
@ 2022-01-19  9:48 ` pinskia at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu.org @ 2022-01-19  9:48 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |12.0

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

end of thread, other threads:[~2022-01-19  9:48 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-13  9:27 [Bug tree-optimization/104002] New: ICE ‘verify_gimple’ failed since r12-1128-gef8176e0fac935c0 marxin at gcc dot gnu.org
2022-01-13 10:17 ` [Bug tree-optimization/104002] " rguenth at gcc dot gnu.org
2022-01-13 10:30 ` rguenth at gcc dot gnu.org
2022-01-13 15:07 ` cvs-commit at gcc dot gnu.org
2022-01-13 15:08 ` rguenth at gcc dot gnu.org
2022-01-19  9:48 ` 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).