[Bug tree-optimization/90856] [10 Regression] ICE: verify_gimple failed (error: incompatible types in 'PHI' argument 1)

2019-06-13 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90856

Richard Biener  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution|--- |FIXED

--- Comment #7 from Richard Biener  ---
Fixed.

[Bug tree-optimization/90856] [10 Regression] ICE: verify_gimple failed (error: incompatible types in 'PHI' argument 1)

2019-06-13 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90856

--- Comment #6 from Richard Biener  ---
Author: rguenth
Date: Thu Jun 13 13:03:13 2019
New Revision: 272244

URL: https://gcc.gnu.org/viewcvs?rev=272244=gcc=rev
Log:
2019-06-13  Richard Biener  

PR tree-optimization/90856
* tree-sra.c (build_ref_for_model): Only use
build_reconstructed_reference when address-spaces are the same.

* gcc.target/i386/pr90856.c: New testcase.

Added:
trunk/gcc/testsuite/gcc.target/i386/pr90856.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/testsuite/ChangeLog
trunk/gcc/tree-sra.c

[Bug tree-optimization/90856] [10 Regression] ICE: verify_gimple failed (error: incompatible types in 'PHI' argument 1)

2019-06-13 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90856

--- Comment #5 from Jakub Jelinek  ---
Created attachment 46487
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=46487=edit
gcc10-pr90856.patch

Untested fix.

[Bug tree-optimization/90856] [10 Regression] ICE: verify_gimple failed (error: incompatible types in 'PHI' argument 1)

2019-06-13 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90856

Richard Biener  changed:

   What|Removed |Added

 Status|NEW |ASSIGNED
   Assignee|unassigned at gcc dot gnu.org  |rguenth at gcc dot 
gnu.org

--- Comment #4 from Richard Biener  ---
Less undefined testcase also failing at -O3:

typedef struct { int v; } S1;
typedef struct { S1 s1[32]; } S2;

S1 clearS1() { S1 s; s.v = 1; return s; }

void
clearS2(__seg_gs S2 *p, int n)
{
  for (int i = 0; i < n; ++i)
p->s1[i] = clearS1();
}

on trunk the issue is SRAs new build_reconstructed_reference which
fails to propagate address-space information from the base to the
model reference.

Testing patch.

[Bug tree-optimization/90856] [10 Regression] ICE: verify_gimple failed (error: incompatible types in 'PHI' argument 1)

2019-06-12 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90856

Richard Biener  changed:

   What|Removed |Added

   Keywords||wrong-code
 CC||rguenth at gcc dot gnu.org

--- Comment #3 from Richard Biener  ---
latent issue I guess.  The vectorizer fails to copy address-space info it
seems.

[Bug tree-optimization/90856] [10 Regression] ICE: verify_gimple failed (error: incompatible types in 'PHI' argument 1)

2019-06-12 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90856

--- Comment #2 from Martin Liška  ---
Reduced test-case:

$ cat ice.c
typedef struct {
  int v;
} S1;

S1 clearS1() {}

typedef struct {
  S1 s1[4];
} S2;

void
clearS2(__seg_gs S2 *p, int n) {
  for (int i = 0; i < n; ++i)
p->s1[i] = clearS1();
}

$ gcc -O1 -c -ftree-loop-vectorize -fno-aggressive-loop-optimizations ice.c
ice.c: In function ‘clearS2’:
ice.c:12:1: error: incompatible types in ‘PHI’ argument 1
   12 | clearS2(__seg_gs S2 *p, int n) {
  | ^~~
vector(4) int *

struct S2 *

vectp_p.10_26 = PHI 
during GIMPLE pass: vect
ice.c:12:1: internal compiler error: verify_gimple failed
0xdc6811 verify_gimple_in_cfg(function*, bool)
/home/marxin/Programming/gcc/gcc/tree-cfg.c:5426
0xc9b3ff execute_function_todo
/home/marxin/Programming/gcc/gcc/passes.c:1963
0xc9c32e execute_todo
/home/marxin/Programming/gcc/gcc/passes.c:2017
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See  for instructions.

[Bug tree-optimization/90856] [10 Regression] ICE: verify_gimple failed (error: incompatible types in 'PHI' argument 1)

2019-06-12 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90856

Martin Liška  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2019-06-12
 CC||jamborm at gcc dot gnu.org,
   ||marxin at gcc dot gnu.org
  Known to work||9.1.0
   Target Milestone|--- |10.0
 Ever confirmed|0   |1
  Known to fail||10.0

--- Comment #1 from Martin Liška  ---
Confirmed, started with r272012