[Bug fortran/65766] New: gFortran Compiler SEGFAULTING on compiling simple program

2015-04-14 Thread giorgianb at gmail dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65766

Bug ID: 65766
   Summary: gFortran Compiler SEGFAULTING on compiling simple
program
   Product: gcc
   Version: 4.9.2
Status: UNCONFIRMED
  Severity: major
  Priority: P3
 Component: fortran
  Assignee: unassigned at gcc dot gnu.org
  Reporter: giorgianb at gmail dot com

Created attachment 35315
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=35315&action=edit
Program that leads to gfortran SEGFAULTING

The problem is that when using gfortran to compile a simple program
(the source code for the program is attached) on the Raspberry Pi 2,
the compiler crashes, giving this error message:

bash-4.2$ gfortran-4.9 7.f95
f951: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See  for instructions.

Some version info from gfortran-4.9:

bash-4.2$ gfortran-4.9 --version
GNU Fortran (Raspbian 4.9.2-10) 4.9.2
Copyright (C) 2014 Free Software Foundation, Inc.

GNU Fortran comes with NO WARRANTY, to the extent permitted by law.
You may redistribute copies of GNU Fortran
under the terms of the GNU General Public License.
For more information about these matters, see the file named COPY

Running the program uname -a to give some info:

bash-4.2$ uname -a
Linux raspberrypi 3.18.10-v7+ #774 SMP PREEMPT Wed Mar 25 14:10:30 GMT
2015 armv7l GNU/Linux

Running gfortran-4.9 in valgrind hints to an unsupported system call:

bash-4.2$ valgrind gfortran-4.9 7.f95
==5539== Memcheck, a memory error detector
==5539== Copyright (C) 2002-2011, and GNU GPL'd, by Julian Seward et al.
==5539== Using Valgrind-3.7.0 and LibVEX; rerun with -h for copyright info
==5539== Command: gfortran-4.9 7.f95
==5539==
--5539-- WARNING: unhandled syscall: 369
--5539-- You may be able to write your own handler.
--5539-- Read the file README_MISSING_SYSCALL_OR_IOCTL.
--5539-- Nevertheless we consider this a bug.  Please report
--5539-- it at http://valgrind.org/support/bug_reports.html.
--5539-- WARNING: unhandled syscall: 369
--5539-- You may be able to write your own handler.
--5539-- Read the file README_MISSING_SYSCALL_OR_IOCTL.
--5539-- Nevertheless we consider this a bug.  Please report
--5539-- it at http://valgrind.org/support/bug_reports.html.
f951: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See  for instructions.
==5539==
==5539== HEAP SUMMARY:
==5539== in use at exit: 41,873 bytes in 89 blocks
==5539==   total heap usage: 218 allocs, 129 frees, 52,452 bytes allocated
==5539==
==5539== LEAK SUMMARY:
==5539==definitely lost: 5,337 bytes in 34 blocks
==5539==indirectly lost: 16 bytes in 1 blocks
==5539==  possibly lost: 0 bytes in 0 blocks
==5539==still reachable: 36,520 bytes in 54 blocks
==5539== suppressed: 0 bytes in 0 blocks
==5539== Rerun with --leak-check=full to see details of leaked memory
==5539==
==5539== For counts of detected and suppressed errors, rerun with: -v
==5539== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 0 from 0)

Thank you for your time. I appreciate the GNU community's effort into
producing good compilers.

Giorgian


[Bug fortran/67900] New: Interface bug: Binding parameters to C causes a compiler segmentation fault.

2015-10-08 Thread giorgianb at gmail dot com
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