Bug 95856 - [11 Regression] error: definition in block 2 follows the use since r11-1582-gcf07eea8429c923b
Summary: [11 Regression] error: definition in block 2 follows the use since r11-1582-g...
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
Depends on:
Blocks: spec
  Show dependency treegraph
 
Reported: 2020-06-24 07:08 UTC by Martin Liška
Modified: 2020-06-24 11:00 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Liška 2020-06-24 07:08:28 UTC
Reduced from blender SPEC2017 benchmark:

$ cat space_graph.i
typedef struct {
  float xmin, xmax;
} rctf;

typedef struct {
  rctf tot;
} View2D;

View2D graph_main_area_draw_v2d;

void get_graph_keyframe_extents();

void
graph_main_area_draw() {
  get_graph_keyframe_extents();
  graph_main_area_draw_v2d.tot.xmin -= 10.0f;
  graph_main_area_draw_v2d.tot.xmax += 10.0f;
}

$ gcc -O3 space_graph.i -c
space_graph.i: In function 'graph_main_area_draw':
space_graph.i:14:1: error: definition in block 2 follows the use
   14 | graph_main_area_draw() {
      | ^~~~~~~~~~~~~~~~~~~~
for SSA_NAME: vect__1.5_9 in statement:
vect__4.7_12 = vect__1.5_9 + vect_cst__10;
during GIMPLE pass: slp
space_graph.i:14:1: internal compiler error: verify_ssa failed
0xfcee12 verify_ssa(bool, bool)
	/home/marxin/Programming/gcc/gcc/tree-ssa.c:1208
0xce0a45 execute_function_todo
	/home/marxin/Programming/gcc/gcc/passes.c:1992
0xce178c do_per_function
	/home/marxin/Programming/gcc/gcc/passes.c:1640
0xce178c execute_todo
	/home/marxin/Programming/gcc/gcc/passes.c:2039
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.
Comment 1 Richard Biener 2020-06-24 07:54:43 UTC
Mine.
Comment 2 GCC Commits 2020-06-24 10:58:52 UTC
The master branch has been updated by Richard Biener <rguenth@gcc.gnu.org>:

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

commit r11-1621-gd32708e796504eaeaad7d19990909204d74f9ba3
Author: Richard Biener <rguenther@suse.de>
Date:   Tue Jun 23 13:59:20 2020 +0200

    tree-optimization/95856 fix vect_stmt_dominates_stmt_p at BB region boundary
    
    The following adjusts vect_stmt_dominates_stmt_p to honor out-of-region
    stmts we run into which have UID -1u.
    
    2020-06-24  Richard Biener  <rguenther@suse.de>
    
            PR tree-optimization/95856
            * tree-vectorizer.c (vect_stmt_dominates_stmt_p): Honor
            region marker -1u.
    
            * gcc.dg/vect/pr95856.c: New testcase.
Comment 3 Richard Biener 2020-06-24 11:00:24 UTC
Fixed.