Discussion:
[patch, fortran] Fix PR 85896, type confusion with min and max
Thomas Koenig
2018-10-30 18:56:46 UTC
Permalink
Hello world,

the attached patchlet fixes a rejects-valid bug by simply ignoring the
type for max and min during simplification. This is correct
because setting the type of a generic intrinsic function has
no effect.

It is a rare pleasure to fix a bug by removing code only :-)

Regression-tested. OK for trunk?

Regards

Thomas

2018-10-30 Thomas Koenig <***@gcc.gnu.org>

PR fortran/85896
* simplify.c (simplify_min_max): Do not convert the type of the
return expression.

2018-10-30 Thomas Koenig <***@gcc.gnu.org>

PR fortran/85896
* gfortran.dg/min_max_type.f90: New test.
Janne Blomqvist
2018-10-30 19:21:23 UTC
Permalink
Post by Thomas Koenig
Hello world,
the attached patchlet fixes a rejects-valid bug by simply ignoring the
type for max and min during simplification. This is correct
because setting the type of a generic intrinsic function has
no effect.
It is a rare pleasure to fix a bug by removing code only :-)
Regression-tested. OK for trunk?
Ok, thanks.
--
Janne Blomqvist
Loading...