public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/98048] New: ICE in build_vector_from_val, at tree.c:1985
@ 2020-11-29  1:44 vsevolod.livinskij at frtk dot ru
  2020-11-29  3:51 ` [Bug target/98048] [11 Regression] ICE in build_vector_from_val, at tree.c:1985 by r11-5429 hjl.tools at gmail dot com
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: vsevolod.livinskij at frtk dot ru @ 2020-11-29  1:44 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 98048
           Summary: ICE in build_vector_from_val, at tree.c:1985
           Product: gcc
           Version: 11.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: vsevolod.livinskij at frtk dot ru
  Target Milestone: ---

Reproducer:
extern short var_0;
extern int var_3;
extern int arr_277[];
int a(int b, int c) { return b < c ? b : c; }
int e;
void test() {
  e = var_0;
  for (int d = 0; d < 9; d++)
    if (var_3)
      arr_277[d] = a(var_0, -var_0);
}

Error:
>$ g++ -c -O3 func.cpp
during GIMPLE pass: veclower2
func.cpp: In function ‘void test()’:
func.cpp:6:6: internal compiler error: in build_vector_from_val, at tree.c:1985
    6 | void test() {
      |      ^~~~
0x88bffd build_vector_from_val(tree_node*, tree_node*)
        /home/vlivinsk/workspace/gcc/gcc_src/gcc/tree.c:1985
0x13a22cd expand_vector_operations_1
        /home/vlivinsk/workspace/gcc/gcc_src/gcc/tree-vect-generic.c:2095
0x13a22cd expand_vector_operations
        /home/vlivinsk/workspace/gcc/gcc_src/gcc/tree-vect-generic.c:2291
0x13a22cd execute
        /home/vlivinsk/workspace/gcc/gcc_src/gcc/tree-vect-generic.c:2337
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.

gcc version 11.0.0 20201126 (beb9afcaf1466996a301c778596c5df209e7913c)

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

* [Bug target/98048] [11 Regression] ICE in build_vector_from_val, at tree.c:1985 by r11-5429
  2020-11-29  1:44 [Bug tree-optimization/98048] New: ICE in build_vector_from_val, at tree.c:1985 vsevolod.livinskij at frtk dot ru
@ 2020-11-29  3:51 ` hjl.tools at gmail dot com
  2020-11-29 18:28 ` [Bug tree-optimization/98048] " ubizjak at gmail dot com
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: hjl.tools at gmail dot com @ 2020-11-29  3:51 UTC (permalink / raw)
  To: gcc-bugs

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

H.J. Lu <hjl.tools at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|ICE in                      |[11 Regression] ICE in
                   |build_vector_from_val, at   |build_vector_from_val, at
                   |tree.c:1985                 |tree.c:1985 by r11-5429
   Target Milestone|---                         |11.0
                 CC|                            |ubizjak at gmail dot com
             Target|                            |x86-64
     Ever confirmed|0                           |1
             Status|UNCONFIRMED                 |NEW
          Component|tree-optimization           |target
   Last reconfirmed|                            |2020-11-29

--- Comment #1 from H.J. Lu <hjl.tools at gmail dot com> ---
It is caused by r11-5429

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

* [Bug tree-optimization/98048] [11 Regression] ICE in build_vector_from_val, at tree.c:1985 by r11-5429
  2020-11-29  1:44 [Bug tree-optimization/98048] New: ICE in build_vector_from_val, at tree.c:1985 vsevolod.livinskij at frtk dot ru
  2020-11-29  3:51 ` [Bug target/98048] [11 Regression] ICE in build_vector_from_val, at tree.c:1985 by r11-5429 hjl.tools at gmail dot com
@ 2020-11-29 18:28 ` ubizjak at gmail dot com
  2020-11-30  8:10 ` rguenth at gcc dot gnu.org
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: ubizjak at gmail dot com @ 2020-11-29 18:28 UTC (permalink / raw)
  To: gcc-bugs

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

Uroš Bizjak <ubizjak at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|target                      |tree-optimization

--- Comment #2 from Uroš Bizjak <ubizjak at gmail dot com> ---
The patch exposed a bug in generic vector handling code.

We have:

      if (op >= FIRST_NORM_OPTAB && op <= LAST_NORM_OPTAB
          && optab_handler (op, TYPE_MODE (TREE_TYPE (type))) !=
CODE_FOR_nothing)

where abs_optab in E_HImode enables this condition.

There is nothing wrong with the patch itself.

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

* [Bug tree-optimization/98048] [11 Regression] ICE in build_vector_from_val, at tree.c:1985 by r11-5429
  2020-11-29  1:44 [Bug tree-optimization/98048] New: ICE in build_vector_from_val, at tree.c:1985 vsevolod.livinskij at frtk dot ru
  2020-11-29  3:51 ` [Bug target/98048] [11 Regression] ICE in build_vector_from_val, at tree.c:1985 by r11-5429 hjl.tools at gmail dot com
  2020-11-29 18:28 ` [Bug tree-optimization/98048] " ubizjak at gmail dot com
@ 2020-11-30  8:10 ` rguenth at gcc dot gnu.org
  2020-11-30 12:28 ` cvs-commit at gcc dot gnu.org
  2020-11-30 12:43 ` rguenth at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: rguenth at gcc dot gnu.org @ 2020-11-30  8:10 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
I will have a look.

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

* [Bug tree-optimization/98048] [11 Regression] ICE in build_vector_from_val, at tree.c:1985 by r11-5429
  2020-11-29  1:44 [Bug tree-optimization/98048] New: ICE in build_vector_from_val, at tree.c:1985 vsevolod.livinskij at frtk dot ru
                   ` (2 preceding siblings ...)
  2020-11-30  8:10 ` rguenth at gcc dot gnu.org
@ 2020-11-30 12:28 ` cvs-commit at gcc dot gnu.org
  2020-11-30 12:43 ` rguenth at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2020-11-30 12:28 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 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:4bcded23eb87c55a1a3fcd23d5629a0c35aee4ba

commit r11-5539-g4bcded23eb87c55a1a3fcd23d5629a0c35aee4ba
Author: Richard Biener <rguenther@suse.de>
Date:   Mon Nov 30 10:41:36 2020 +0100

    tree-optimization/98048 - fix vector lowering of ABSU_EXPR

    This makes sure to use the correct type for the LHS of the scalar
    replacement statement.

    20220-11-30  Richard Biener  <rguenther@suse.de>

            PR tree-optimization/98048
            * tree-vect-generic.c (expand_vector_operations_1): Use the
            correct type for the scalar LHS replacement.

            * gcc.dg/vect/pr98048.c: New testcase.

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

* [Bug tree-optimization/98048] [11 Regression] ICE in build_vector_from_val, at tree.c:1985 by r11-5429
  2020-11-29  1:44 [Bug tree-optimization/98048] New: ICE in build_vector_from_val, at tree.c:1985 vsevolod.livinskij at frtk dot ru
                   ` (3 preceding siblings ...)
  2020-11-30 12:28 ` cvs-commit at gcc dot gnu.org
@ 2020-11-30 12:43 ` rguenth at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: rguenth at gcc dot gnu.org @ 2020-11-30 12:43 UTC (permalink / raw)
  To: gcc-bugs

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

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

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

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

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

end of thread, other threads:[~2020-11-30 12:43 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-29  1:44 [Bug tree-optimization/98048] New: ICE in build_vector_from_val, at tree.c:1985 vsevolod.livinskij at frtk dot ru
2020-11-29  3:51 ` [Bug target/98048] [11 Regression] ICE in build_vector_from_val, at tree.c:1985 by r11-5429 hjl.tools at gmail dot com
2020-11-29 18:28 ` [Bug tree-optimization/98048] " ubizjak at gmail dot com
2020-11-30  8:10 ` rguenth at gcc dot gnu.org
2020-11-30 12:28 ` cvs-commit at gcc dot gnu.org
2020-11-30 12:43 ` 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).