mirror of
https://gcc.gnu.org/git/gcc.git
synced 2024-11-24 19:33:59 +08:00
re PR fortran/48352 (segfault in fortran/frontend-passes.c)
2011-04-01 Thomas Koenig <tkoenig@gcc.gnu.org> PR fortran/48352 * frontend-passes (cfe_register_funcs): Don't register functions if they appear as iterators in DO loops. 2011-04-01 Thomas Koenig <tkoenig@gcc.gnu.org> PR fortran/48352 * gfortran.dg/function_optimize_3.f90: New test. From-SVN: r171849
This commit is contained in:
parent
b318fb4bbc
commit
6e98bce41e
@ -1,4 +1,10 @@
|
||||
2011-03-30 Michael Matz matz@suse.de>
|
||||
2011-04-01 Thomas Koenig <tkoenig@gcc.gnu.org>
|
||||
|
||||
PR fortran/48352
|
||||
* frontend-passes (cfe_register_funcs): Don't
|
||||
register functions if they appear as iterators in DO loops.
|
||||
|
||||
2011-03-30 Michael Matz <matz@suse.de>
|
||||
|
||||
PR fortran/47516
|
||||
* trans-expr.c (realloc_lhs_loop_for_fcn_call): Take loop as parameter,
|
||||
|
@ -137,6 +137,13 @@ static int
|
||||
cfe_register_funcs (gfc_expr **e, int *walk_subtrees ATTRIBUTE_UNUSED,
|
||||
void *data ATTRIBUTE_UNUSED)
|
||||
{
|
||||
|
||||
/* FIXME - there is a bug in the insertion code for DO loops. Bail
|
||||
out here. */
|
||||
|
||||
if ((*current_code)->op == EXEC_DO)
|
||||
return 0;
|
||||
|
||||
if ((*e)->expr_type != EXPR_FUNCTION)
|
||||
return 0;
|
||||
|
||||
|
@ -1,3 +1,8 @@
|
||||
2011-04-01 Thomas Koenig <tkoenig@gcc.gnu.org>
|
||||
|
||||
PR fortran/48352
|
||||
* gfortran.dg/function_optimize_3.f90: New test.
|
||||
|
||||
2011-04-01 Bernd Schmidt <bernds@codesourcery.com>
|
||||
|
||||
* gcc.c-torture/compile/20110401-1.c: New test.
|
||||
|
9
gcc/testsuite/gfortran.dg/function_optimize_3.f90
Normal file
9
gcc/testsuite/gfortran.dg/function_optimize_3.f90
Normal file
@ -0,0 +1,9 @@
|
||||
! { dg-do compile }
|
||||
! { dg-options "-O" }
|
||||
! PR 48352 - variable elimination in a DO loop caused segfaults.
|
||||
! Test case contributed by Joost VandeVondele
|
||||
program main
|
||||
INTEGER, DIMENSION(:), POINTER :: a
|
||||
DO I=1,MIN(SIZE(a),SIZE(a))
|
||||
ENDDO
|
||||
END program main
|
Loading…
Reference in New Issue
Block a user