public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/59146] New: Segfault when ommiting '&' in 'bind (C) ' procedure call
@ 2013-11-15 13:24 jean.charles.papin@o-mail.fr
2013-11-15 13:40 ` [Bug fortran/59146] " dominiq at lps dot ens.fr
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: jean.charles.papin@o-mail.fr @ 2013-11-15 13:24 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59146
Bug ID: 59146
Summary: Segfault when ommiting '&' in 'bind (C) ' procedure
call
Product: gcc
Version: 4.8.1
Status: UNCONFIRMED
Severity: minor
Priority: P3
Component: fortran
Assignee: unassigned at gcc dot gnu.org
Reporter: jean.charles.papin@o-mail.fr
Created attachment 31225
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=31225&action=edit
test.F90
gFortran ends with a segfault when trying to compile this code (a '&' is
missing at the end the 'subroutine' line, so the syntax is incorrect):
Begin code --------------------- [test.F90]
subroutine f ()
integer fortran_var
interface
subroutine c_func (a)& ! works
!subroutine c_func (a) ! segfault
bind (C, Name="c_func")
integer :: a
end subroutine c_func
end interface
call c_func(fortran_var)
end subroutine f
End code --------------------- [test.F90]
Command line: gfortran -v -save-temps -c test.F90
gFortran output:
Using built-in specs.
COLLECT_GCC=gfortran
Target: x86_64-unknown-linux-gnu
Configured with: ./configure --prefix=/home/jc/.local_root/
--with-gmp=/home/jc/.local_root/ --with-mpfr=/home/jc/.local_root/
--with-mpc=/home/jc/.local_root/ --with-libelf=/home/jc/.local_root/
--with-cloog=/home/jc/.local_root/ --enable-languages=c,c++,fortran
--with-march=corei7-avx --enable-libsanitizer
Thread model: posix
gcc version 4.8.1 (GCC)
COLLECT_GCC_OPTIONS='-c' '-v' '-save-temps' '-mtune=generic' '-march=x86-64'
/home/jc/.local_root/bin/../libexec/gcc/x86_64-unknown-linux-gnu/4.8.1/f951
test.F90 -cpp=test.f90 -quiet -v -iprefix
/home/jc/.local_root/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.8.1/ test.F90
-quiet -dumpbase test.F90 -mtune=generic -march=x86-64 -auxbase test -version
-fintrinsic-modules-path
/home/jc/.local_root/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.8.1/finclude -o
test.s
GNU Fortran (GCC) version 4.8.1 (x86_64-unknown-linux-gnu)
compiled by GNU C version 4.8.1, GMP version 5.1.3, MPFR version 3.1.2, MPC
version 1.0.1
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
ignoring nonexistent directory
"/home/jc/.local_root/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.8.1/../../../../x86_64-unknown-linux-gnu/include"
ignoring duplicate directory
"/home/jc/.local_root/bin/../lib/gcc/../../lib/gcc/x86_64-unknown-linux-gnu/4.8.1/include"
ignoring nonexistent directory "/usr/local/include"
ignoring duplicate directory
"/home/jc/.local_root/bin/../lib/gcc/../../lib/gcc/x86_64-unknown-linux-gnu/4.8.1/include-fixed"
ignoring nonexistent directory
"/home/jc/.local_root/bin/../lib/gcc/../../lib/gcc/x86_64-unknown-linux-gnu/4.8.1/../../../../x86_64-unknown-linux-gnu/include"
#include "..." search starts here:
#include <...> search starts here:
/home/jc/.local_root/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.8.1/finclude
/usr/local/intel/Compiler/12.0/084/composerxe-2011.0.084/mkl/include
/usr/local/intel/Compiler/12.0/084/composerxe-2011.0.084/tbb/include
/home/jc/.local_root/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.8.1/include
/home/jc/.local_root/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.8.1/include-fixed
/home/jc/.local_root/bin/../lib/gcc/../../include
/usr/include
End of search list.
GNU Fortran (GCC) version 4.8.1 (x86_64-unknown-linux-gnu)
compiled by GNU C version 4.8.1, GMP version 5.1.3, MPFR version 3.1.2, MPC
version 1.0.1
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
COLLECT_GCC_OPTIONS='-c' '-v' '-save-temps' '-mtune=generic' '-march=x86-64'
as -v --64 -o test.o test.s
GNU assembler version 2.20.51.0.2 (x86_64-redhat-linux) using BFD version
version 2.20.51.0.2-5.36.el6 20100205
COMPILER_PATH=/home/jc/.local_root/bin/../libexec/gcc/x86_64-unknown-linux-gnu/4.8.1/:/home/jc/.local_root/bin/../libexec/gcc/
LIBRARY_PATH=/home/jc/.local_root/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.8.1/:/home/jc/.local_root/bin/../lib/gcc/:/home/jc/.local_root/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.8.1/../../../../lib64/:/lib/../lib64/:/usr/lib/../lib64/:/usr/local/intel/Compiler/12.0/084/composerxe-2011.0.084/compiler/lib/intel64/:/usr/local/intel/Compiler/12.0/084/composerxe-2011.0.084/ipp/../compiler/lib/intel64/:/usr/local/intel/Compiler/12.0/084/composerxe-2011.0.084/ipp/lib/intel64/:/usr/local/intel/Compiler/12.0/084/composerxe-2011.0.084/compiler/lib/intel64/:/usr/local/intel/Compiler/12.0/084/composerxe-2011.0.084/mkl/lib/intel64/:/usr/local/intel/Compiler/12.0/084/composerxe-2011.0.084/tbb/lib/intel64//cc4.1.0_libc2.4_kernel2.6.16.21/:/home/jc/.local_root/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.8.1/../../../:/lib/:/usr/lib/
COLLECT_GCC_OPTIONS='-c' '-v' '-save-temps' '-mtune=generic' '-march=x86-64'
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug fortran/59146] Segfault when ommiting '&' in 'bind (C) ' procedure call
2013-11-15 13:24 [Bug fortran/59146] New: Segfault when ommiting '&' in 'bind (C) ' procedure call jean.charles.papin@o-mail.fr
@ 2013-11-15 13:40 ` dominiq at lps dot ens.fr
2013-11-17 15:21 ` jean-charles.papin@ens-cachan.fr
2013-11-18 12:08 ` jean-charles.papin@ens-cachan.fr
2 siblings, 0 replies; 4+ messages in thread
From: dominiq at lps dot ens.fr @ 2013-11-15 13:40 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59146
Dominique d'Humieres <dominiq at lps dot ens.fr> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |burnus@net-b.de
--- Comment #1 from Dominique d'Humieres <dominiq at lps dot ens.fr> ---
This has been fixed on trunk (4.9.0) between revisions 199034 (2013-05-17) and
199221 (2013-05-22) which gives
pr59146_db.f90:13.31:
call c_func(fortran_var)
1
pr59146_db.f90:8.35:
bind (C, Name="c_func")
2
Error: Global name 'c_func' at (1) is already being used as a COMMON at (2)
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug fortran/59146] Segfault when ommiting '&' in 'bind (C) ' procedure call
2013-11-15 13:24 [Bug fortran/59146] New: Segfault when ommiting '&' in 'bind (C) ' procedure call jean.charles.papin@o-mail.fr
2013-11-15 13:40 ` [Bug fortran/59146] " dominiq at lps dot ens.fr
@ 2013-11-17 15:21 ` jean-charles.papin@ens-cachan.fr
2013-11-18 12:08 ` jean-charles.papin@ens-cachan.fr
2 siblings, 0 replies; 4+ messages in thread
From: jean-charles.papin@ens-cachan.fr @ 2013-11-17 15:21 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59146
--- Comment #3 from Jean-Charles Papin <jean-charles.papin@ens-cachan.fr> ---
Ok, thanks a lot for these information :)
I've just try gcc-4.9 and, as you mentioned, this has been fixed.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug fortran/59146] Segfault when ommiting '&' in 'bind (C) ' procedure call
2013-11-15 13:24 [Bug fortran/59146] New: Segfault when ommiting '&' in 'bind (C) ' procedure call jean.charles.papin@o-mail.fr
2013-11-15 13:40 ` [Bug fortran/59146] " dominiq at lps dot ens.fr
2013-11-17 15:21 ` jean-charles.papin@ens-cachan.fr
@ 2013-11-18 12:08 ` jean-charles.papin@ens-cachan.fr
2 siblings, 0 replies; 4+ messages in thread
From: jean-charles.papin@ens-cachan.fr @ 2013-11-18 12:08 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59146
Jean-Charles Papin <jean-charles.papin@ens-cachan.fr> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|WAITING |RESOLVED
Resolution|--- |FIXED
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-11-18 12:08 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-11-15 13:24 [Bug fortran/59146] New: Segfault when ommiting '&' in 'bind (C) ' procedure call jean.charles.papin@o-mail.fr
2013-11-15 13:40 ` [Bug fortran/59146] " dominiq at lps dot ens.fr
2013-11-17 15:21 ` jean-charles.papin@ens-cachan.fr
2013-11-18 12:08 ` jean-charles.papin@ens-cachan.fr
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).