[Bug fortran/72698] [5/6/7 Regression] ICE in lhd_incomplete_type_error, at langhooks.c:205

2016-08-18 Thread vehre at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=72698

vehre at gcc dot gnu.org changed:

   What|Removed |Added

 Status|WAITING |RESOLVED
 Resolution|--- |FIXED

--- Comment #12 from vehre at gcc dot gnu.org ---
No regressions reported so far, closing.

[Bug fortran/72698] [5/6/7 Regression] ICE in lhd_incomplete_type_error, at langhooks.c:205

2016-08-11 Thread vehre at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=72698

--- Comment #11 from vehre at gcc dot gnu.org ---
Committed early to catch the next gcc-6 release. Now waiting one week for
regressions before closing.

[Bug fortran/72698] [5/6/7 Regression] ICE in lhd_incomplete_type_error, at langhooks.c:205

2016-08-11 Thread vehre at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=72698

--- Comment #10 from vehre at gcc dot gnu.org ---
Author: vehre
Date: Thu Aug 11 07:57:58 2016
New Revision: 239353

URL: https://gcc.gnu.org/viewcvs?rev=239353=gcc=rev
Log:
gcc/testsuite/ChangeLog:

2016-08-11  Andre Vehreschild  

Backport from trunk:
PR fortran/72698
* gfortran.dg/allocate_with_source_20.f03: New test.


gcc/fortran/ChangeLog:

2016-08-11  Andre Vehreschild  

Backport from trunk:
PR fortran/72698
* trans-stmt.c (gfc_trans_allocate): Prevent generating code for
copy of zero sized string and with it an ICE.


Added:
branches/gcc-5-branch/gcc/testsuite/gfortran.dg/allocate_with_source_20.f03
Modified:
branches/gcc-5-branch/gcc/fortran/ChangeLog
branches/gcc-5-branch/gcc/fortran/trans-stmt.c
branches/gcc-5-branch/gcc/testsuite/ChangeLog

[Bug fortran/72698] [5/6/7 Regression] ICE in lhd_incomplete_type_error, at langhooks.c:205

2016-08-11 Thread vehre at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=72698

--- Comment #9 from vehre at gcc dot gnu.org ---
Author: vehre
Date: Thu Aug 11 07:46:33 2016
New Revision: 239352

URL: https://gcc.gnu.org/viewcvs?rev=239352=gcc=rev
Log:
gcc/testsuite/ChangeLog:

2016-08-11  Andre Vehreschild  

Backport from trunk:
PR fortran/72698
* gfortran.dg/allocate_with_source_20.f03: New test.


gcc/fortran/ChangeLog:

2016-08-11  Andre Vehreschild  

Backport from trunk:
PR fortran/72698
* trans-stmt.c (gfc_trans_allocate): Prevent generating code for
copy of zero sized string and with it an ICE.


Added:
branches/gcc-6-branch/gcc/testsuite/gfortran.dg/allocate_with_source_20.f03
Modified:
branches/gcc-6-branch/gcc/fortran/ChangeLog
branches/gcc-6-branch/gcc/fortran/trans-stmt.c
branches/gcc-6-branch/gcc/testsuite/ChangeLog

[Bug fortran/72698] [5/6/7 Regression] ICE in lhd_incomplete_type_error, at langhooks.c:205

2016-08-08 Thread vehre at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=72698

--- Comment #8 from vehre at gcc dot gnu.org ---
Waiting one week for regressions to occur before backporting to gcc-5/6.

[Bug fortran/72698] [5/6/7 Regression] ICE in lhd_incomplete_type_error, at langhooks.c:205

2016-08-08 Thread vehre at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=72698

--- Comment #7 from vehre at gcc dot gnu.org ---
Author: vehre
Date: Mon Aug  8 09:49:37 2016
New Revision: 239236

URL: https://gcc.gnu.org/viewcvs?rev=239236=gcc=rev
Log:
gcc/testsuite/ChangeLog:

2016-08-08  Andre Vehreschild  

PR fortran/72698
* gfortran.dg/allocate_with_source_20.f03: New test.


gcc/fortran/ChangeLog:

2016-08-08  Andre Vehreschild  

PR fortran/72698
* trans-stmt.c (gfc_trans_allocate): Prevent generating code for
copy of zero sized string and with it an ICE.


Added:
trunk/gcc/testsuite/gfortran.dg/allocate_with_source_20.f03
Modified:
trunk/gcc/fortran/ChangeLog
trunk/gcc/fortran/trans-stmt.c
trunk/gcc/testsuite/ChangeLog

[Bug fortran/72698] [5/6/7 Regression] ICE in lhd_incomplete_type_error, at langhooks.c:205

2016-08-07 Thread vehre at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=72698

vehre at gcc dot gnu.org changed:

   What|Removed |Added

 Status|ASSIGNED|WAITING

--- Comment #6 from vehre at gcc dot gnu.org ---
Patch available at:

https://gcc.gnu.org/ml/fortran/2016-08/msg00020.html

Waiting for review.

[Bug fortran/72698] [5/6/7 Regression] ICE in lhd_incomplete_type_error, at langhooks.c:205

2016-08-06 Thread vehre at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=72698

vehre at gcc dot gnu.org changed:

   What|Removed |Added

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

--- Comment #5 from vehre at gcc dot gnu.org ---
Well, garbage in, garbage out...

[Bug fortran/72698] [5/6/7 Regression] ICE in lhd_incomplete_type_error, at langhooks.c:205

2016-08-06 Thread jakub at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=72698

Jakub Jelinek  changed:

   What|Removed |Added

   Priority|P2  |P4
 CC||jakub at gcc dot gnu.org,
   ||vehre at gcc dot gnu.org

--- Comment #4 from Jakub Jelinek  ---
Started with r221621.

[Bug fortran/72698] [5/6/7 Regression] ICE in lhd_incomplete_type_error, at langhooks.c:205

2016-07-27 Thread rguenth at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=72698

Richard Biener  changed:

   What|Removed |Added

   Priority|P3  |P2

--- Comment #3 from Richard Biener  ---
Ugh, what a gross usage of a langhook ;)  Its default implementation clearly
doesn't match the use in size_in_bytes:

tree
size_in_bytes_loc (location_t loc, const_tree type)
{
  tree t;

  if (type == error_mark_node)
return integer_zero_node;

  type = TYPE_MAIN_VARIANT (type);
  t = TYPE_SIZE_UNIT (type);

  if (t == 0)
{
  lang_hooks.types.incomplete_type_error (loc, NULL_TREE, type);

but the langhook (not sure what the point is in asserting in the no-op
default implementation):

/* Invalid use of an incomplete type.  */
void
lhd_incomplete_type_error (location_t ARG_UNUSED (loc),
   const_tree ARG_UNUSED (value), const_tree type)
{
  gcc_assert (TREE_CODE (type) == ERROR_MARK);
  return;


OTOH the early out in size_in_bytes means the langhook can never be safely
used or its assert is bogus.  Or the fortran FE messes things up in
unexpected ways (failing to call layout_type on a non-ERROR_MARK type).

[Bug fortran/72698] [5/6/7 Regression] ICE in lhd_incomplete_type_error, at langhooks.c:205

2016-07-26 Thread marxin at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=72698

Martin Liška  changed:

   What|Removed |Added

   Keywords||ice-on-invalid-code
 Status|UNCONFIRMED |NEW
   Last reconfirmed||2016-07-26
 CC||marxin at gcc dot gnu.org
   Target Milestone|--- |5.5
Summary|ICE in  |[5/6/7 Regression] ICE in
   |lhd_incomplete_type_error,  |lhd_incomplete_type_error,
   |at langhooks.c:205  |at langhooks.c:205
 Ever confirmed|0   |1

--- Comment #2 from Martin Liška  ---
Confirmed.