[Bug tree-optimization/97737] [11 Regression] ICE at -Os and above: tree check: expected class ‘type’, have ‘exceptional’ (error_mark) in useless_type_conversion_p, at gimple-expr.c:88

2020-11-06 Thread amacleod at redhat dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97737

Andrew Macleod  changed:

   What|Removed |Added

 Resolution|DUPLICATE   |FIXED

--- Comment #6 from Andrew Macleod  ---
I also put this testcase into the suite since propagating undefined in
range-ops would also fix the Other PR, but not this one.   So although the
problem are similar and covered by the same patch, its possible to change the
fix for one and not fix the other.

Still, fixed.

[Bug tree-optimization/97737] [11 Regression] ICE at -Os and above: tree check: expected class ‘type’, have ‘exceptional’ (error_mark) in useless_type_conversion_p, at gimple-expr.c:88

2020-11-06 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97737

--- Comment #5 from CVS Commits  ---
The master branch has been updated by Andrew Macleod :

https://gcc.gnu.org/g:129e1a8a96d140150705fab30d25afb464eb1d99

commit r11-4795-g129e1a8a96d140150705fab30d25afb464eb1d99
Author: Andrew MacLeod 
Date:   Fri Nov 6 14:14:46 2020 -0500

Combine new calculated ranges with existing range.

When a range is recalculated, retain what was previously known as IL
changes
can produce different results from un-executed code.   This also paves
the way for external injection of ranges.

gcc/
PR tree-optimization/97737
PR tree-optimization/97741
* gimple-range.cc: (gimple_ranger::range_of_stmt): Intersect newly
calculated ranges with the existing known global range.
gcc/testsuite/
* gcc.dg/pr97737.c: New.
* gcc.dg/pr97741.c: New.

[Bug tree-optimization/97737] [11 Regression] ICE at -Os and above: tree check: expected class ‘type’, have ‘exceptional’ (error_mark) in useless_type_conversion_p, at gimple-expr.c:88

2020-11-06 Thread zhendong.su at inf dot ethz.ch via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97737

--- Comment #4 from Zhendong Su  ---
I would guess that it makes more sense to mark PR 97741 as a dup of this bug.

[Bug tree-optimization/97737] [11 Regression] ICE at -Os and above: tree check: expected class ‘type’, have ‘exceptional’ (error_mark) in useless_type_conversion_p, at gimple-expr.c:88

2020-11-06 Thread amacleod at redhat dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97737

Andrew Macleod  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |DUPLICATE

--- Comment #3 from Andrew Macleod  ---
This is actually the same issue as 97741.  The iL is being changed and we lose
info.  The first thing visited is:

e_4 = PHI <1(2), e_3(7)>

and the incoming edge from bb7 is determined to be undefined, so we fold e_4 to
1
but later on the undefined edge becomes defined due a "harmless" constant in
unreachable code being propagated.

The end result is now:

 :
  b = 1;
  a.0_1 = a;
  e_10 = 1 / a.0_1;
  if (e_10 == 0)
goto ; [INV]
  else
goto ; [INV]

   :
  c.1_2 = c;

   :
  return;

*** This bug has been marked as a duplicate of bug 97741 ***

[Bug tree-optimization/97737] [11 Regression] ICE at -Os and above: tree check: expected class ‘type’, have ‘exceptional’ (error_mark) in useless_type_conversion_p, at gimple-expr.c:88

2020-11-06 Thread marxin at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97737

Martin Liška  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
  Known to work||10.2.0
  Known to fail||11.0
 CC||amacleod at redhat dot com,
   ||marxin at gcc dot gnu.org
 Ever confirmed|0   |1
   Keywords||ice-on-valid-code
   Last reconfirmed||2020-11-06

--- Comment #2 from Martin Liška  ---
Started with r11-4724-ge86fd6a17cdb2671.

[Bug tree-optimization/97737] [11 Regression] ICE at -Os and above: tree check: expected class ‘type’, have ‘exceptional’ (error_mark) in useless_type_conversion_p, at gimple-expr.c:88

2020-11-05 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97737

Richard Biener  changed:

   What|Removed |Added

 CC||aldyh at gcc dot gnu.org
Summary|ICE at -Os and above: tree  |[11 Regression] ICE at -Os
   |check: expected class   |and above: tree check:
   |‘type’, have ‘exceptional’  |expected class ‘type’, have
   |(error_mark) in |‘exceptional’ (error_mark)
   |useless_type_conversion_p,  |in
   |at gimple-expr.c:88 |useless_type_conversion_p,
   ||at gimple-expr.c:88
   Target Milestone|--- |11.0
   Priority|P3  |P1

--- Comment #1 from Richard Biener  ---
probably similar as that other bug