Bug 96134

Summary: [11 Regression] ICE in tree_to_poly_uint64, at tree.c:2985 since r11-1801-g9e5508c2d006f2d4
Product: gcc Reporter: Martin Liška <marxin>
Component: tree-optimizationAssignee: Richard Biener <rguenth>
Status: RESOLVED FIXED    
Severity: normal CC: rguenth
Priority: P3 Keywords: ice-on-valid-code
Version: 11.0   
Target Milestone: 11.0   
Host: Target:
Build: Known to work:
Known to fail: Last reconfirmed: 2020-07-09 00:00:00
Bug Depends on:    
Bug Blocks: 26163    
Attachments: test-case

Description Martin Liška 2020-07-09 13:27:16 UTC
Created attachment 48850 [details]
test-case

The following ICEs:

$ gcc -O3 x.f90 -c
...
internal compiler error: in tree_to_poly_uint64, at tree.c:2985
0x735beb tree_to_poly_uint64(tree_node const*)
	/home/marxin/Programming/gcc/gcc/tree.c:2985
0x10cc8f5 bit_field_size(tree_node const*)
	/home/marxin/Programming/gcc/gcc/tree.h:5176
0x10cc8f5 vect_build_slp_tree_2
	/home/marxin/Programming/gcc/gcc/tree-vect-slp.c:1337
0x10cb3d1 vect_build_slp_tree
	/home/marxin/Programming/gcc/gcc/tree-vect-slp.c:1193
0x10ccbb6 vect_build_slp_tree_2
	/home/marxin/Programming/gcc/gcc/tree-vect-slp.c:1510
0x10cb3d1 vect_build_slp_tree
	/home/marxin/Programming/gcc/gcc/tree-vect-slp.c:1193
0x10cbdef vect_build_slp_tree_2
	/home/marxin/Programming/gcc/gcc/tree-vect-slp.c:1411
0x10cb3d1 vect_build_slp_tree
	/home/marxin/Programming/gcc/gcc/tree-vect-slp.c:1193
0x10cbdef vect_build_slp_tree_2
	/home/marxin/Programming/gcc/gcc/tree-vect-slp.c:1411
0x10cb3d1 vect_build_slp_tree
	/home/marxin/Programming/gcc/gcc/tree-vect-slp.c:1193
0x10cbdef vect_build_slp_tree_2
	/home/marxin/Programming/gcc/gcc/tree-vect-slp.c:1411
0x10cb3d1 vect_build_slp_tree
	/home/marxin/Programming/gcc/gcc/tree-vect-slp.c:1193
0x10cbdef vect_build_slp_tree_2
	/home/marxin/Programming/gcc/gcc/tree-vect-slp.c:1411
0x10cb3d1 vect_build_slp_tree
	/home/marxin/Programming/gcc/gcc/tree-vect-slp.c:1193
0x10cbdef vect_build_slp_tree_2
	/home/marxin/Programming/gcc/gcc/tree-vect-slp.c:1411
0x10cb3d1 vect_build_slp_tree
	/home/marxin/Programming/gcc/gcc/tree-vect-slp.c:1193
0x10cbdef vect_build_slp_tree_2
	/home/marxin/Programming/gcc/gcc/tree-vect-slp.c:1411
0x10cb3d1 vect_build_slp_tree
	/home/marxin/Programming/gcc/gcc/tree-vect-slp.c:1193
0x10cbdef vect_build_slp_tree_2
	/home/marxin/Programming/gcc/gcc/tree-vect-slp.c:1411
0x10cb3d1 vect_build_slp_tree
	/home/marxin/Programming/gcc/gcc/tree-vect-slp.c:1193
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
Comment 1 Martin Liška 2020-07-09 13:27:39 UTC
Reduced from 416.gamess benchmark.
Comment 2 Richard Biener 2020-07-09 13:58:43 UTC
Mine.
Comment 3 Richard Biener 2020-07-09 17:54:50 UTC
Fixed.
Comment 4 Richard Biener 2020-07-09 17:55:40 UTC
The master branch has been updated by Richard Biener <rguenth@gcc.gnu.org>:

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

commit r11-1972-g9ddea9306251b7d4e4fd1d67a5941ef7448b2e66
Author: Richard Biener <rguenther@suse.de>
Date:   Thu Jul 9 16:06:04 2020 +0200

    fixup BIT_FIELD_REF detection in SLP discovery
    
    This fixes a thinko where we end up combining a BIT_FIELD_REF
    and a memory access, fixed by checking all stmts are a load or
    none.
    
    2020-07-09  Richard Biener  <rguenther@suse.de>
    
            PR tree-optimization/96133
            * tree-vect-slp.c (vect_build_slp_tree_1): Compare load_p
            status between stmts.