This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
[gfortran,patch] Add MIN/MAX for character type
- From: FX Coudert <fxcoudert at gmail dot com>
- To: Fortran List <fortran at gcc dot gnu dot org>, gcc-patches list <gcc-patches at gcc dot gnu dot org>
- Date: Sun, 5 Aug 2007 13:00:59 +0100
- Subject: [gfortran,patch] Add MIN/MAX for character type
- Dkim-signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:mime-version:to:message-id:content-type:from:subject:date:x-mailer; b=eG4katr1VFHEiKbcom2wDIWbWvQ+r1/9tbUkisZpUWtfkzQyKVa/hv+NY9hir1ln8E+ye4W2fqJqWr4iYfBH2LrkIuSnllj5buJij50W/N4exP+3gpHP85PG+vUvCIyrzwYkR51og8nEDPf8cDBkKdy+5vsOGZoSaejizkXXmG4=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:mime-version:to:message-id:content-type:from:subject:date:x-mailer; b=e7q3QQcH0D/3XBge2cdMcU2lNbDyZkJyedw1IcmMuRZz7K6yByV3bw5l3Z2wjaUcVQHBPr4yhj1yUN4zOkwbFdD3y1q58PV9AuzOKkFKkSOxmYJWMptrsWsOjvWd1Be6kOdnUgyEqhcIygsEce58VQNIkuapqQsXn3/se5/FPLc=
Hi all,
Attached patch adds support for MIN and MAX intrinsics on character-
type expressions, which is part of F2003. It is rather
straightforward, comes with a simplification routine and a library
implementation. The most difficult part, in my opinion, is the trans-
intrinsic.c part: since MIN/MAX accept a variable number of arguments
(and they're the only intrinsics to do so), it requires special
handling to create the library function call. I will also mention
that the patch correctly takes into account the possibility of
optional arguments.
Bootstrapped and regtested on x86_64-linux, comes with two testcases
(one for valid code and one for runtime error checking). OK to commit?
FX
Attachment:
minmax_char.ChangeLog
Description: Binary data
Attachment:
minmax_char.diff
Description: Binary data