This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/83254] New: gfortran doesn't consider c_loc addresses c_associated


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

            Bug ID: 83254
           Summary: gfortran doesn't consider c_loc addresses c_associated
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: woodard at redhat dot com
  Target Milestone: ---

Created attachment 42776
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=42776&action=edit
example program

gfortran 7.1 -> current trunk doesn't consider c_loc addresses c_associated the
way that earlier versions of gfortran does.

[ben@localhost cassoc]$ gfortran --version
GNU Fortran (GCC) 6.3.1 20170216 (Red Hat 6.3.1-3)
Copyright (C) 2016 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

[ben@localhost cassoc]$ gfortran cassoc.f90 -o cassoc.6.3.1
[ben@localhost cassoc]$ ./cassoc.6.3.1 
 true
 true

but it seems like something broke in the 7 series of compilers. 

[ben@Mustang c_assoc]$ gfortran --version
GNU Fortran (GCC) 7.2.1 20170915 (Red Hat 7.2.1-2)
Copyright (C) 2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

[ben@Mustang c_assoc]$ gfortran cassoc.f90 
[ben@Mustang c_assoc]$ ./a.out 
 true
 false

The original report targeted 7.1 and the problem appears to persist all the way
to the current trunk.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]