Bug 95916 - [11 Regression] ICE during GIMPLE pass: slp : verify_ssa failed
Summary: [11 Regression] ICE during GIMPLE pass: slp : verify_ssa failed
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: tree-optimization (show other bugs)
Version: 11.0
: P3 normal
Target Milestone: 11.0
Assignee: Richard Biener
URL:
Keywords: ice-on-valid-code
: 95987 (view as bug list)
Depends on:
Blocks: yarpgen
  Show dependency treegraph
 
Reported: 2020-06-26 17:52 UTC by Vsevolod Livinskii
Modified: 2021-11-01 23:07 UTC (History)
6 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2020-06-29 00:00:00


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Vsevolod Livinskii 2020-06-26 17:52:08 UTC
Error:
>$ g++ -c -O3 func.cpp
func.cpp: In function ‘void test()’:
func.cpp:5:6: error: definition in block 3 follows the use
    5 | void test() {
      |      ^~~~
for SSA_NAME: var_5.3_5 in statement:
vect__6.8_50 = vect__4.7_58 << var_5.3_5;
during GIMPLE pass: slp
func.cpp:5:6: internal compiler error: verify_ssa failed
0x1339a82 verify_ssa(bool, bool)
	gcc/tree-ssa.c:1208
0x1025705 execute_function_todo
	gcc/passes.c:1992
0x10263de execute_todo
	gcc/passes.c:2039

Reproducer:
extern short var_3, var_8;
extern int var_5;
extern char var_10;
extern int arr_99[][16];
void test() {
  for (; 0 < var_10;)
    for (long a(var_8);; a++)
      arr_99[4][a] = var_3 << var_5;
}

GCC version:
11.0.0 20200625 (77d455ee81ec3a23f8b20259a31ab963716f8e82)
Comment 1 Vsevolod Livinskii 2020-06-26 17:52:51 UTC
This bug might be related to bug 95761
Comment 2 Richard Biener 2020-06-29 09:41:26 UTC
Confirmed, mine.
Comment 3 Martin Liška 2020-06-29 09:51:07 UTC
Just for the record, started with r11-1649-gd2adb79eac663874.
Comment 4 GCC Commits 2020-06-29 12:41:16 UTC
The master branch has been updated by Richard Biener <rguenth@gcc.gnu.org>:

https://gcc.gnu.org/g:9a4a52e359ba16a2516a735dca838af512b19336

commit r11-1710-g9a4a52e359ba16a2516a735dca838af512b19336
Author: Richard Biener <rguenther@suse.de>
Date:   Mon Jun 29 13:53:51 2020 +0200

    tree-optimization/95916 - treat scalar ops explicitely
    
    This explicitely treats the case of scalar operands for SLP
    when computing insert locations.
    
    2020-06-29  Richard Biener  <rguenther@suse.de>
    
            PR tree-optimization/95916
            * tree-vect-slp.c (vect_schedule_slp_instance): Explicitely handle
            the case of not vectorized externals.
    
            * gcc.dg/vect/pr95916.c: New testcase.
Comment 5 Richard Biener 2020-06-29 12:41:23 UTC
Fixed.
Comment 6 Richard Biener 2020-06-30 07:13:01 UTC
*** Bug 95987 has been marked as a duplicate of this bug. ***