[Patch, fortran] PR30887 and PR30888 - overdone constraints on %VAL

Tobias Burnus burnus@net-b.de
Thu Feb 22 23:48:00 GMT 2007


:ADDPATCH fortran:

> The attached are completely self explanatory fixes for the above to
> %VAL problems.
The patch might be self explanatory, but it does not completely fix
PR30887 since in trans-expr.c every %VAL() is converted to the default type.

> Bootstrapped and regtested on x86_ia64/FC5.
My patch is regtested on x86_64-unknown-linux-gnu.

One think I don't understand is the following:

Why does it regtest at your system without any errors while I get a FAIL
for "c_by_val_5.f" (in my patch now called "c_by_val_4.f") because of
two warnings due to -pedantic? They are due to the %VAL():
   Warning: Extension: argument list function at (1)

In gfortran.dg/dg.exp you should also have:
    set DEFAULT_FFLAGS " -pedantic-errors"

(Actually, why does  gfortran -c -pedantic-errors c_by_val_4.f; echo
"Status: $?"
print "Status: 0" for -pedantic-errors? Shouldn't this return a non-zero
status code? Although, I'm quite happy it doesn't since I would have no
chance to "dg-do run" this testcase as there is unfortunately no
"-no-pedantic" option.)

Tobias
-------------- next part --------------
A non-text attachment was scrubbed...
Name: val.diff
Type: text/x-patch
Size: 7117 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20070222/34dc40ca/attachment.bin>


More information about the Gcc-patches mailing list