diff options
author | Jakub Jelinek <jakub@redhat.com> | 2009-07-24 09:57:13 +0200 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2009-07-24 09:57:13 +0200 |
commit | 80927a562e1ec4a38a12f4b09b86f2f3ca9f253e (patch) | |
tree | 3a1ba521bd64c06116c292171eb8e9008c0f6c2b /gcc/fortran/trans-array.h | |
parent | 3a802a9e6ddcf43f9c211b417f8435e3b63ce3cc (diff) | |
download | gcc-80927a562e1ec4a38a12f4b09b86f2f3ca9f253e.zip gcc-80927a562e1ec4a38a12f4b09b86f2f3ca9f253e.tar.gz gcc-80927a562e1ec4a38a12f4b09b86f2f3ca9f253e.tar.bz2 |
re PR fortran/40643 (maxloc/minloc: Wrong result for NaN at position 1)
PR fortran/40643
PR fortran/31067
* trans-intrinsic.c (gfc_conv_intrinsic_minmaxloc,
gfc_conv_intrinsic_minmaxval): Handle Infinities and NaNs properly,
optimize.
* trans-array.c (gfc_trans_scalarized_loop_end): No longer static.
* trans-array.h (gfc_trans_scalarized_loop_end): New prototype.
* libgfortran.h (GFC_REAL_4_INFINITY, GFC_REAL_8_INFINITY,
GFC_REAL_10_INFINITY, GFC_REAL_16_INFINITY, GFC_REAL_4_QUIET_NAN,
GFC_REAL_8_QUIET_NAN, GFC_REAL_10_QUIET_NAN, GFC_REAL_16_QUIET_NAN):
Define.
* m4/iparm.m4 (atype_inf, atype_nan): Define.
* m4/ifunction.m4: Formatting.
* m4/iforeach.m4: Likewise.
(START_FOREACH_FUNCTION): Initialize dest to all 1s, not all 0s.
(START_FOREACH_BLOCK, FINISH_FOREACH_FUNCTION,
FINISH_MASKED_FOREACH_FUNCTION): Run foreach block inside a loop
until count[0] == extent[0].
* m4/minval.m4: Formatting. Handle NaNs and infinities. Optimize.
* m4/maxval.m4: Likewise.
* m4/minloc0.m4: Likewise.
* m4/maxloc0.m4: Likewise.
* m4/minloc1.m4: Likewise.
* m4/maxloc1.m4: Likewise.
* generated/maxloc0_16_i16.c: Regenerated.
* generated/maxloc0_16_i1.c: Likewise.
* generated/maxloc0_16_i2.c: Likewise.
* generated/maxloc0_16_i4.c: Likewise.
* generated/maxloc0_16_i8.c: Likewise.
* generated/maxloc0_16_r10.c: Likewise.
* generated/maxloc0_16_r16.c: Likewise.
* generated/maxloc0_16_r4.c: Likewise.
* generated/maxloc0_16_r8.c: Likewise.
* generated/maxloc0_4_i16.c: Likewise.
* generated/maxloc0_4_i1.c: Likewise.
* generated/maxloc0_4_i2.c: Likewise.
* generated/maxloc0_4_i4.c: Likewise.
* generated/maxloc0_4_i8.c: Likewise.
* generated/maxloc0_4_r10.c: Likewise.
* generated/maxloc0_4_r16.c: Likewise.
* generated/maxloc0_4_r4.c: Likewise.
* generated/maxloc0_4_r8.c: Likewise.
* generated/maxloc0_8_i16.c: Likewise.
* generated/maxloc0_8_i1.c: Likewise.
* generated/maxloc0_8_i2.c: Likewise.
* generated/maxloc0_8_i4.c: Likewise.
* generated/maxloc0_8_i8.c: Likewise.
* generated/maxloc0_8_r10.c: Likewise.
* generated/maxloc0_8_r16.c: Likewise.
* generated/maxloc0_8_r4.c: Likewise.
* generated/maxloc0_8_r8.c: Likewise.
* generated/maxloc1_16_i16.c: Likewise.
* generated/maxloc1_16_i1.c: Likewise.
* generated/maxloc1_16_i2.c: Likewise.
* generated/maxloc1_16_i4.c: Likewise.
* generated/maxloc1_16_i8.c: Likewise.
* generated/maxloc1_16_r10.c: Likewise.
* generated/maxloc1_16_r16.c: Likewise.
* generated/maxloc1_16_r4.c: Likewise.
* generated/maxloc1_16_r8.c: Likewise.
* generated/maxloc1_4_i16.c: Likewise.
* generated/maxloc1_4_i1.c: Likewise.
* generated/maxloc1_4_i2.c: Likewise.
* generated/maxloc1_4_i4.c: Likewise.
* generated/maxloc1_4_i8.c: Likewise.
* generated/maxloc1_4_r10.c: Likewise.
* generated/maxloc1_4_r16.c: Likewise.
* generated/maxloc1_4_r4.c: Likewise.
* generated/maxloc1_4_r8.c: Likewise.
* generated/maxloc1_8_i16.c: Likewise.
* generated/maxloc1_8_i1.c: Likewise.
* generated/maxloc1_8_i2.c: Likewise.
* generated/maxloc1_8_i4.c: Likewise.
* generated/maxloc1_8_i8.c: Likewise.
* generated/maxloc1_8_r10.c: Likewise.
* generated/maxloc1_8_r16.c: Likewise.
* generated/maxloc1_8_r4.c: Likewise.
* generated/maxloc1_8_r8.c: Likewise.
* generated/maxval_i16.c: Likewise.
* generated/maxval_i1.c: Likewise.
* generated/maxval_i2.c: Likewise.
* generated/maxval_i4.c: Likewise.
* generated/maxval_i8.c: Likewise.
* generated/maxval_r10.c: Likewise.
* generated/maxval_r16.c: Likewise.
* generated/maxval_r4.c: Likewise.
* generated/maxval_r8.c: Likewise.
* generated/minloc0_16_i16.c: Likewise.
* generated/minloc0_16_i1.c: Likewise.
* generated/minloc0_16_i2.c: Likewise.
* generated/minloc0_16_i4.c: Likewise.
* generated/minloc0_16_i8.c: Likewise.
* generated/minloc0_16_r10.c: Likewise.
* generated/minloc0_16_r16.c: Likewise.
* generated/minloc0_16_r4.c: Likewise.
* generated/minloc0_16_r8.c: Likewise.
* generated/minloc0_4_i16.c: Likewise.
* generated/minloc0_4_i1.c: Likewise.
* generated/minloc0_4_i2.c: Likewise.
* generated/minloc0_4_i4.c: Likewise.
* generated/minloc0_4_i8.c: Likewise.
* generated/minloc0_4_r10.c: Likewise.
* generated/minloc0_4_r16.c: Likewise.
* generated/minloc0_4_r4.c: Likewise.
* generated/minloc0_4_r8.c: Likewise.
* generated/minloc0_8_i16.c: Likewise.
* generated/minloc0_8_i1.c: Likewise.
* generated/minloc0_8_i2.c: Likewise.
* generated/minloc0_8_i4.c: Likewise.
* generated/minloc0_8_i8.c: Likewise.
* generated/minloc0_8_r10.c: Likewise.
* generated/minloc0_8_r16.c: Likewise.
* generated/minloc0_8_r4.c: Likewise.
* generated/minloc0_8_r8.c: Likewise.
* generated/minloc1_16_i16.c: Likewise.
* generated/minloc1_16_i1.c: Likewise.
* generated/minloc1_16_i2.c: Likewise.
* generated/minloc1_16_i4.c: Likewise.
* generated/minloc1_16_i8.c: Likewise.
* generated/minloc1_16_r10.c: Likewise.
* generated/minloc1_16_r16.c: Likewise.
* generated/minloc1_16_r4.c: Likewise.
* generated/minloc1_16_r8.c: Likewise.
* generated/minloc1_4_i16.c: Likewise.
* generated/minloc1_4_i1.c: Likewise.
* generated/minloc1_4_i2.c: Likewise.
* generated/minloc1_4_i4.c: Likewise.
* generated/minloc1_4_i8.c: Likewise.
* generated/minloc1_4_r10.c: Likewise.
* generated/minloc1_4_r16.c: Likewise.
* generated/minloc1_4_r4.c: Likewise.
* generated/minloc1_4_r8.c: Likewise.
* generated/minloc1_8_i16.c: Likewise.
* generated/minloc1_8_i1.c: Likewise.
* generated/minloc1_8_i2.c: Likewise.
* generated/minloc1_8_i4.c: Likewise.
* generated/minloc1_8_i8.c: Likewise.
* generated/minloc1_8_r10.c: Likewise.
* generated/minloc1_8_r16.c: Likewise.
* generated/minloc1_8_r4.c: Likewise.
* generated/minloc1_8_r8.c: Likewise.
* generated/minval_i16.c: Likewise.
* generated/minval_i1.c: Likewise.
* generated/minval_i2.c: Likewise.
* generated/minval_i4.c: Likewise.
* generated/minval_i8.c: Likewise.
* generated/minval_r10.c: Likewise.
* generated/minval_r16.c: Likewise.
* generated/minval_r4.c: Likewise.
* generated/minval_r8.c: Likewise.
* generated/product_c10.c: Likewise.
* generated/product_c16.c: Likewise.
* generated/product_c4.c: Likewise.
* generated/product_c8.c: Likewise.
* generated/product_i16.c: Likewise.
* generated/product_i1.c: Likewise.
* generated/product_i2.c: Likewise.
* generated/product_i4.c: Likewise.
* generated/product_i8.c: Likewise.
* generated/product_r10.c: Likewise.
* generated/product_r16.c: Likewise.
* generated/product_r4.c: Likewise.
* generated/product_r8.c: Likewise.
* generated/sum_c10.c: Likewise.
* generated/sum_c16.c: Likewise.
* generated/sum_c4.c: Likewise.
* generated/sum_c8.c: Likewise.
* generated/sum_i16.c: Likewise.
* generated/sum_i1.c: Likewise.
* generated/sum_i2.c: Likewise.
* generated/sum_i4.c: Likewise.
* generated/sum_i8.c: Likewise.
* generated/sum_r10.c: Likewise.
* generated/sum_r16.c: Likewise.
* generated/sum_r4.c: Likewise.
* generated/sum_r8.c: Likewise.
* gfortran.dg/maxlocval_2.f90: New test.
* gfortran.dg/maxlocval_3.f90: New test.
* gfortran.dg/maxlocval_4.f90: New test.
* gfortran.dg/minlocval_1.f90: New test.
* gfortran.dg/minlocval_2.f90: New test.
* gfortran.dg/minlocval_3.f90: New test.
* gfortran.dg/minlocval_4.f90: New test.
From-SVN: r150041
Diffstat (limited to 'gcc/fortran/trans-array.h')
-rw-r--r-- | gcc/fortran/trans-array.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/fortran/trans-array.h b/gcc/fortran/trans-array.h index 9b0b830..175b3c6 100644 --- a/gcc/fortran/trans-array.h +++ b/gcc/fortran/trans-array.h @@ -1,5 +1,5 @@ /* Header for array handling functions - Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008 + Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. Contributed by Paul Brook @@ -84,6 +84,8 @@ void gfc_copy_loopinfo_to_se (gfc_se *, gfc_loopinfo *); /* Marks the start of a scalarized expression, and declares loop variables. */ void gfc_start_scalarized_body (gfc_loopinfo *, stmtblock_t *); +/* Generates one actual loop for a scalarized expression. */ +void gfc_trans_scalarized_loop_end (gfc_loopinfo *, int, stmtblock_t *); /* Generates the actual loops for a scalarized expression. */ void gfc_trans_scalarizing_loops (gfc_loopinfo *, stmtblock_t *); /* Mark the end of the main loop body and the start of the copying loop. */ |