[Patch, Fortran] Use -huge()-1 as most negative integer for maxval/maxloc (PR30512)

Thomas Koenig Thomas.Koenig@online.de
Sat Feb 3 12:18:00 GMT 2007

On Sat, Feb 03, 2007 at 10:45:56AM +0100, Tobias Burnus wrote:

> While I still don't understand why
>    m4/pow.m4:ifelse(rtype_letter,i,`dnl
> works (unquoted "i"). I found out why

The quoting rules of m4 are arcane at best, and the style of the m4
files in libgfortran is also pretty bad (a lot of reversed quoting
going on there).

Unfortunately, m4 is pretty much a write-only language.  Also, the
state of the m4 files is pretty sorry (the style is inconsistent,
and there is no documentation).  I've submitted PR 30690 about
this (thre really should be a 'cleanup' keyword :-).

> It works for   "function_r8.c" where rtype_letter
> is "r", but
> it fails for "function_16_r8.c" since rtype is integer(16) and while
> atype is real(8).

Ah, my mistake. Sorry for not checking the results more thoroughly.

> The following fixes it:
> define(atype_min,ifelse(regexp(file, `_\(.\)[0-9]*\.c$',
> `\1'),`i',`(-'atype_max`-1)',`-'atype_max))dnl

> Ok for the trunk and a week later for the 4.2 branch?

I'll look at it later this weekend, if nobody else beats me to it.


More information about the Gcc-patches mailing list