Commit 5b338450 by Thomas Koenig

re PR fortran/62142 (internal compiler error: Segmentation fault (X = X - L*floor(X/L)))

2014-08-15  Thomas Koenig  <tkoenig@gcc.gnu.org>

	PR fortran/62142
	* trans-expr.c (is_runtime_conformable):  Add NULL pointer checks.

2014-08-15  Thomas Koenig  <tkoenig@gcc.gnu.org>

	PR fortran/62142
	* gfortran.dg/realloc_on_assign_24.f90:  New test.

From-SVN: r214043
parent 33cb682b
2014-08-15 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/62142
* trans-expr.c (is_runtime_conformable): Add NULL pointer checks.
2014-08-15 Tobias Burnus <burnus@net-b.de>
* resolve.c (resolve_critical): Fix name mangling.
......
......@@ -7897,7 +7897,7 @@ is_runtime_conformable (gfc_expr *expr1, gfc_expr *expr2)
for (a = expr2->value.function.actual; a != NULL; a = a->next)
{
e1 = a->expr;
if (e1->rank > 0 && !is_runtime_conformable (expr1, e1))
if (e1 && e1->rank > 0 && !is_runtime_conformable (expr1, e1))
return false;
}
return true;
......@@ -7908,7 +7908,7 @@ is_runtime_conformable (gfc_expr *expr1, gfc_expr *expr2)
for (a = expr2->value.function.actual; a != NULL; a = a->next)
{
e1 = a->expr;
if (e1->rank > 0 && !is_runtime_conformable (expr1, e1))
if (e1 && e1->rank > 0 && !is_runtime_conformable (expr1, e1))
return false;
}
return true;
......
2014-08-15 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/62142
* gfortran.dg/realloc_on_assign_24.f90: New test.
2014-08-15 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/62072
......
! { dg-do compile }
! PR 62142 - this used to segfault
! Original test case by Ondřej Čertík .
program test_segfault
implicit none
real, allocatable :: X(:)
allocate (x(1))
x = 1.
X = floor(X)
end program
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