Bug 97835 - [11 Regression] ICE: verify_gimple failed (error: incorrect type of vector CONSTRUCTOR elements)
Summary: [11 Regression] ICE: verify_gimple failed (error: incorrect type of vector CO...
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: tree-optimization (show other bugs)
Version: 11.0
: P1 normal
Target Milestone: 11.0
Assignee: Richard Biener
URL:
Keywords: ice-on-invalid-code
Depends on:
Blocks:
 
Reported: 2020-11-15 08:03 UTC by Arseny Solokha
Modified: 2020-11-16 09:27 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2020-11-16 00:00:00


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Arseny Solokha 2020-11-15 08:03:08 UTC
gcc-11.0.0-alpha20201108 snapshot (g:b642fca1c31b2e2175e0860daf32b4ee0d918085) ICEs when compiling the following testcase w/ -O3:

struct co {
  int gx;
  int ty;
};

void
x0 (struct co *yy, long int kc, int wi, int md)
{
  while (wi < 1)
    {
      yy[wi].gx = md;
      yy[wi].ty = wi;
      md += kc;
      ++wi;
    }
}

% gcc-11.0.0 -O3 -c wqrlepsw.c
wqrlepsw.c: In function 'x0':
wqrlepsw.c:7:1: error: incorrect type of vector CONSTRUCTOR elements
    7 | x0 (struct co *yy, long int kc, int wi, int md)
      | ^~
{_28, 1, _28, 1}

_52 = {_28, 1, _28, 1};
during GIMPLE pass: vect
wqrlepsw.c:7:1: internal compiler error: verify_gimple failed
0xe13ee2 verify_gimple_in_cfg(function*, bool)
	/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20201108/work/gcc-11-20201108/gcc/tree-cfg.c:5461
0xcea557 execute_function_todo
	/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20201108/work/gcc-11-20201108/gcc/passes.c:2039
0xceafbe execute_todo
	/var/tmp/portage/sys-devel/gcc-11.0.0_alpha20201108/work/gcc-11-20201108/gcc/passes.c:2093
Comment 1 Richard Biener 2020-11-16 07:23:39 UTC
I will have a looksee.
Comment 2 Martin Liška 2020-11-16 07:30:43 UTC
For completeness, started with r11-4614-ge881774d0dda6d51.
Comment 3 GCC Commits 2020-11-16 09:27:33 UTC
The master branch has been updated by Richard Biener <rguenth@gcc.gnu.org>:

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

commit r11-5048-gd12603b746986554981f5ee220926a36a6cb6baf
Author: Richard Biener <rguenther@suse.de>
Date:   Mon Nov 16 09:06:41 2020 +0100

    tree-optimization/97835 - fix step vector construction for SLP induction
    
    We're stripping conversions off access functions of inductions and
    thus the step can be of different sign.  Fix bogus step CTORs by
    converting the elements rather than the whole vector.
    
    2020-11-16  Richard Biener  <rguenther@suse.de>
    
            PR tree-optimization/97835
            * tree-vect-loop.c (vectorizable_induction): Convert step
            scalars rather than step vector.
    
            * gcc.dg/vect/pr97835.c: New testcase.
Comment 4 Richard Biener 2020-11-16 09:27:58 UTC
Fixed.