This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/32968] selected_(int|real)_kind fail with -fdefault-integer-8
- From: "sgk at troutmask dot apl dot washington dot edu" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 2 Aug 2007 21:06:19 -0000
- Subject: [Bug fortran/32968] selected_(int|real)_kind fail with -fdefault-integer-8
- References: <bug-32968-12313@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #3 from sgk at troutmask dot apl dot washington dot edu 2007-08-02 21:06 -------
Subject: Re: selected_(int|real)_kind fail with -fdefault-integer-8
On Thu, Aug 02, 2007 at 10:55:45PM +0200, Dominique Dhumieres wrote:
>
> I applied your patch, but on PPC Darwin I get 10 times 1 for int, instead of:
>
> 1 1 2 2 4 4 4 4 4 8
>
What is the -fdump-tree-original for
i = 4
print *, selected_int_kind(i)
print *, selected_real_kind(i)
end
without -fdefault-integer-8 I get
{
int4 D.996;
D.996 = _gfortran_selected_int_kind (&i);
_gfortran_transfer_integer (&dt_parm.1, &D.996, 4);
}
{
int4 D.998;
D.998 = _gfortran_selected_real_kind (&i, 0B);
_gfortran_transfer_integer (&dt_parm.2, &D.998, 4);
}
with it I get
{
int8 D.996;
D.996 = (int8) _gfortran_selected_int_kind (&i);
_gfortran_transfer_integer (&dt_parm.1, &D.996, 8);
}
{
int8 D.998;
D.998 = (int8) _gfortran_selected_real_kind (&i, 0B);
_gfortran_transfer_integer (&dt_parm.2, &D.998, 8);
}
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32968