The fortran frontend does not properly terminate function type argument lists
with void_type_node.

 integer(c_int) function f55()
    f55 = 55
 end function f55

 integer(c_int) function f65()
    f65 = 65
 end function f65

do not match the argument in

void assignf_(int(**ptr)(void)) {
  *ptr = f;
}

prototype-wise, but instead would match

void assignf_(int(**ptr)()) {
  *ptr = f;
}

which has an unprototyped argument list.

I see the Fortran FE accepts excess parameters to functions and only warns
for that with -fwhole-file ...


-- 
           Summary: FAIL: gfortran.dg/proc_ptr_7.f90
           Product: gcc
           Version: lto
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: rguenth at gcc dot gnu dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40949

Reply via email to