-
- Downloads
Fortran: intrinsic MERGE shall use all its arguments [PR107874]
gcc/fortran/ChangeLog:
PR fortran/107874
* simplify.cc (gfc_simplify_merge): When simplifying MERGE with a
constant scalar MASK, ensure that arguments TSOURCE and FSOURCE are
either constant or will be evaluated.
* trans-intrinsic.cc (gfc_conv_intrinsic_merge): Evaluate arguments
before generating conditional expression.
gcc/testsuite/ChangeLog:
PR fortran/107874
* gfortran.dg/merge_init_expr_2.f90: Adjust code to the corrected
simplification.
* gfortran.dg/merge_1.f90: New test.
Co-authored-by:
Steven G. Kargl <kargl@gcc.gnu.org>
Showing
- gcc/fortran/simplify.cc 16 additions, 1 deletiongcc/fortran/simplify.cc
- gcc/fortran/trans-intrinsic.cc 3 additions, 0 deletionsgcc/fortran/trans-intrinsic.cc
- gcc/testsuite/gfortran.dg/merge_1.f90 49 additions, 0 deletionsgcc/testsuite/gfortran.dg/merge_1.f90
- gcc/testsuite/gfortran.dg/merge_init_expr_2.f90 2 additions, 1 deletiongcc/testsuite/gfortran.dg/merge_init_expr_2.f90
Loading
Please register or sign in to comment