[patch, fortran] Fix PR 88658, wrong type for MAX1 and friends type when simplifying

Thomas Koenig tkoenig@netcologne.de
Wed Jan 2 14:32:00 GMT 2019


Hello world,

the attached patch fixes the PR, a regression introduced by r265649,
by special-casing those intrinsics of the min/max family which
need to be special-cased.

This is actually something that had been fixed before (PR 14377),
but at the time, no test case had been committed.

Regression-tested. OK for trunk?

Regards

	Thomas

2019-01-02  Thomas Koenig  <tkoenig@gcc.gnu.org>

	PR fortran/88658
	* gfortran.h: Add macro gfc_real_4_kind
	* simplify.c (simplify_min_max): Special case for the types of
	AMAX0, AMIN0, MAX1 and MIN1, which actually change the types of
	their arguments.

2019-01-02  Thomas Koenig  <tkoenig@gcc.gnu.org>

	PR fortran/88658
	* gfortran.dg/min_max_type_2.f90: New test.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: p1.diff
Type: text/x-patch
Size: 1623 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20190102/3749f641/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: min_max_type_2.f90
Type: text/x-fortran
Size: 506 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20190102/3749f641/attachment-0001.bin>


More information about the Fortran mailing list