public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/67900] New: Interface bug: Binding parameters to C causes a compiler segmentation fault.
@ 2015-10-08 20:33 giorgianb at gmail dot com
  2015-10-08 21:57 ` [Bug fortran/67900] [4.9/5/6 Regression] " dominiq at lps dot ens.fr
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: giorgianb at gmail dot com @ 2015-10-08 20:33 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 67900
           Summary: Interface bug: Binding parameters to C causes a
                    compiler segmentation fault.
           Product: gcc
           Version: 5.1.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
          Assignee: unassigned at gcc dot gnu.org
          Reporter: giorgianb at gmail dot com
  Target Milestone: ---

Created attachment 36465
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=36465&action=edit
Compiling this file will cause the compiler to segmentation fault.

A simple interface declaration in which the parameter names are the same and
are binding to C causes the compiler to segfault. Usually when declaring a
generic interface that does the same operation on varied types, it is good
practice to give the parameters the same name.

The program:

program main
        implicit none
        interface f
                function f_real(x)
                        real, bind(c) :: x
                        real :: f_real
                end function f_real

                function f_integer(x)
                        integer, bind(c) :: x
                        integer :: f_integer
                end function f_integer
        end interface f
end program main

Info about gcc:

$ gcc --version
gcc (GCC) 5.1.1 20150618 (Red Hat 5.1.1-4)
Copyright (C) 2015 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.

Basic machine info:
$ uname -a
Linux localhost.localdomain 4.1.8-200.fc22.x86_64 #1 SMP Tue Sep 22 12:13:21
UTC 2015 x86_64 x86_64 x86_64 GNU/Linux


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2015-10-20  0:47 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-10-08 20:33 [Bug fortran/67900] New: Interface bug: Binding parameters to C causes a compiler segmentation fault giorgianb at gmail dot com
2015-10-08 21:57 ` [Bug fortran/67900] [4.9/5/6 Regression] " dominiq at lps dot ens.fr
2015-10-08 22:01 ` kargl at gcc dot gnu.org
2015-10-09 12:03 ` dominiq at lps dot ens.fr
2015-10-16  8:22 ` rguenth at gcc dot gnu.org
2015-10-18 21:44 ` mikael at gcc dot gnu.org
2015-10-20  0:46 ` kargl at gcc dot gnu.org
2015-10-20  0:47 ` kargl at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).