This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/30887] %VAL only accepts default-kind integer/real/complex
- From: "sdirkse at gams dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 22 Feb 2007 21:35:35 -0000
- Subject: [Bug fortran/30887] %VAL only accepts default-kind integer/real/complex
- References: <bug-30887-11040@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #6 from sdirkse at gams dot com 2007-02-22 21:35 -------
(In reply to comment #4)
> (In reply to comment #3)
> >
> > Enough facts, now for some ignorant speculation: I suppose there is some logic
> > missing to pass a value from the caller when the size of the value is not the
> > default size (i.e. 4 for my platform, Linux 32-bit).
> >
>
> See conv_arglist_function in trans-expr.c.
>
Brilliant! I changed the code in there to use a size of
MAX(default_kind,expression_kind) instead of just default_kind, and it seems to
work now, i.e. the one-liner example is OK. The code was easier to read and
modify than I was expecting, a pleasant surprise.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30887