https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77278

--- Comment #23 from Jan Hubicka <hubicka at ucw dot cz> ---
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77278
> 
> --- Comment #21 from Thomas Koenig <tkoenig at gcc dot gnu.org> ---
> (In reply to Jan Hubicka from comment #20)
> > OK, the mismatched declaration types are:
> > void <T67d> (struct array01_integer(kind=4) &, float & restrict,
> > logical(kind=4) *)
> > and
> > void <T621> (struct gfc_array_i4 * restrict, struct gfc_array_r4 * restrict,
> > GFC_LOGICAL_4)
> > 
> > The mismatch happens in the last parameter that is logical(kind=4) and
> > GFC_LOGICAL_4.
> 
> Thanks for looking into this.
> 
> One question: What do I have to do to get at this type of information,
> and the following tree type dump?  What exactly would I have to
> run?  (I looked around, but could not find any info).

I simply add debug_tree and debug_generic_stmt to the place warning is
output (in lto/lto-symtab.c)
It would be nice to make these warnings more understandable somehow.  I
did some work on the ODR warnings, but in this case it is even harder
(especially because the mismatch is cross-language and we have no way to
dump types in user understandable form at this stage).
> 
> 
> > So mixing up enum and pointer to enum.
> 
> > Fixing C source to expect pointer to enum makes warning to go away, but
> > looking at the gimple produced, it really just seems in bug in fortran FE
> > declaring the function incorrectly? It seems to really just pass 0 instead
> > of pointer to 0:
> > _gfortran_minloc0_4_r4 (&parm.1, _40, 0);
> 
> Now, currently GFC_LOGICAL_4 is just a typedef for GFC_INTEGER_4, which
> in turn is just a typedef for int.  Could this be the source of the
> trouble here?  And what could we do about a GFC_LOGICAL_2 and so on?

In the dump it seems that fortran FE produces boolean_type while the
other is enum type.
We turn enum type into integer type, but boolean remains boolean
so they are not considered same.

Does changing typedef to boolean help?

Honza
> 
> -- 
> You are receiving this mail because:
> You are on the CC list for the bug.

Reply via email to