Commit ef22816c by Thomas Koenig

re PR fortran/85084 (ICE: out of memory allocating 18446744073709551600 bytes ...)

2018-03-27  Thomas Koenig  <tkoenig@gcc.gnu.org>

	PR fortran/85084
	* frontend-passes.c (gfc_run_passes): Do not run front-end
	optimizations if a previous error occurred.

2018-03-27  Thomas Koenig  <tkoenig@gcc.gnu.org>

	PR fortran/85084
	* gfortran.dg/matmul_rank_1.f90: New test.

From-SVN: r258900
parent 13a7688f
2018-03-27 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/85084
* frontend-passes.c (gfc_run_passes): Do not run front-end
optimizations if a previous error occurred.
2018-03-27 Thomas Koenig <tkoenig@gcc.gnu.org>
Harald Anlauf <anlauf@gmx.de>
PR fortran/85083
......
......@@ -156,6 +156,10 @@ gfc_run_passes (gfc_namespace *ns)
check_locus (ns);
#endif
gfc_get_errors (&w, &e);
if (e > 0)
return;
if (flag_frontend_optimize || flag_frontend_loop_interchange)
optimize_namespace (ns);
......@@ -168,10 +172,6 @@ gfc_run_passes (gfc_namespace *ns)
expr_array.release ();
}
gfc_get_errors (&w, &e);
if (e > 0)
return;
if (flag_realloc_lhs)
realloc_strings (ns);
}
......
2018-03-27 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/85084
* gfortran.dg/matmul_rank_1.f90: New test.
2018-03-27 Thomas Koenig <tkoenig@gcc.gnu.org>
Harald Anlauf <anlauf@gmx.de>
* gfortran.dg/structure_constructor_15.f90: New test.
......
! { dg-do compile }
! { dg-additional-options "-ffrontend-optimize" }
! PR 85044 - used to die on allocating a negative amount of memory.
! Test case by Gerhard Steinmetz.
program p
real :: a(3,3) = 1.0
real :: b(33)
b = matmul(a, a) ! { dg-error "Incompatible ranks" }
end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment