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
This commit is contained in:
parent
33cb682bce
commit
5b33845084
4 changed files with 22 additions and 2 deletions
|
@ -1,3 +1,8 @@
|
|||
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;
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
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
|
||||
|
|
10
gcc/testsuite/gfortran.dg/realloc_on_assign_24.f90
Normal file
10
gcc/testsuite/gfortran.dg/realloc_on_assign_24.f90
Normal file
|
@ -0,0 +1,10 @@
|
|||
! { 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
|
Loading…
Add table
Reference in a new issue