[patch, fortran] Fix PR 85896, type confusion with min and max

Thomas Koenig tkoenig@netcologne.de
Tue Oct 30 18:56:00 GMT 2018


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  <tkoenig@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  <tkoenig@gcc.gnu.org>

	PR fortran/85896
	* gfortran.dg/min_max_type.f90: New test.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: p1.diff
Type: text/x-patch
Size: 981 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20181030/02c3aa2f/attachment.bin>


More information about the Fortran mailing list