[Bug fortran/85002] [7/8 Regression] ICE in fold_ternary_loc, at fold-const.c:11360

2018-03-21 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85002

--- Comment #2 from Richard Biener  ---
The issue is that 'dest' is NULL so we build NULL.a which of course can't work.

8845  /* We need source and destination components.  */
8846  comp = fold_build3_loc (input_location, COMPONENT_REF, ctype,
decl,
8847  cdecl, NULL_TREE);
8848  dcmp = fold_build3_loc (input_location, COMPONENT_REF, ctype,
dest,
8849  cdecl, NULL_TREE);
8850  dcmp = fold_convert (TREE_TYPE (comp), dcmp);
8851

[Bug fortran/85002] [7/8 Regression] ICE in fold_ternary_loc, at fold-const.c:11360

2018-03-20 Thread dominiq at lps dot ens.fr
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85002

Dominique d'Humieres  changed:

   What|Removed |Added

   Priority|P3  |P4
 Status|UNCONFIRMED |NEW
  Known to work||6.4.0
   Keywords||ice-on-valid-code
   Last reconfirmed||2018-03-21
 CC||vehre at gcc dot gnu.org
 Ever confirmed|0   |1
   Target Milestone|--- |7.4
  Known to fail||7.3.0, 8.0.1

--- Comment #1 from Dominique d'Humieres  ---
Reduced range: r242984 (2016-11-29) is OK, r243219 (2016-11-29) gives the ICE,
r243021?

The test compiles without the line

   y = t2([x])