public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/30224] New: segmentation falut when compiling certain code
@ 2006-12-15 18:02 trumsko at yahoo dot com
2006-12-15 18:05 ` [Bug fortran/30224] " trumsko at yahoo dot com
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: trumsko at yahoo dot com @ 2006-12-15 18:02 UTC (permalink / raw)
To: gcc-bugs
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 3572 bytes --]
gfortran crashes when compiling the attached code
[trob@aqua] /tmp/gfortcrash $ gfortran -c kinds.f90 constants.f90 lorentz.f90
lorentz.f90: In function rotation_generic_cs:
lorentz.f90:775: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
[trob@aqua] /tmp/gfortcrash $ gfortran -v
Using built-in specs.
Target: i686-pc-linux-gnu
Configured with: /home/fxcoudert/gfortran_nightbuild/trunk/configure
--prefix=/home/fxcoudert/gfortran_nightbuild/irun-20061130
--enable-languages=c,fortran
--with-gmp=/home/fxcoudert/gfortran_nightbuild/software
Thread model: posix
gcc version 4.3.0 20061130 (experimental)
Reduced testcase:
================== lorentz_red.f90 =============================
module lorentz
implicit none
public :: rotation
integer, dimension(3,3,3), parameter :: epsilon_three = &
& reshape( source = (/ 0, 0,0, 0,0,-1, 0,1,0,&
& 0, 0,1, 0,0, 0, -1,0,0,&
& 0,-1,0, 1,0, 0, 0,0,0 /),&
& shape = (/3,3,3/) )
interface rotation
module procedure rotation_generic_cs
end interface
contains
function rotation_generic_cs(cp, sp, n) result(a)
real :: a
real, intent(in) :: cp, sp
real, dimension(3), intent(in) :: n
integer :: i,j
a=cp*cp + (1-cp)*n(i)*n(j) &
& - sp*dot_product(epsilon_three(i,j,:), n)
end function rotation_generic_cs
end module lorentz
=========================================================
[trob@aqua] /tmp/gfortcrash2 $ gfortran -c lorentz_red.f90
lorentz.f90: In function rotation_generic_cs:
lorentz.f90:18: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
Note that changing the order of the calculation produces an "internal compiler
error" instead of a segmentation fault:
================= lorentz_red2.f90 ==========================
module lorentz
implicit none
public :: rotation
integer, dimension(3,3,3), parameter :: epsilon_three = &
& reshape( source = (/ 0, 0,0, 0,0,-1, 0,1,0,&
& 0, 0,1, 0,0, 0, -1,0,0,&
& 0,-1,0, 1,0, 0, 0,0,0 /),&
& shape = (/3,3,3/) )
interface rotation
module procedure rotation_generic_cs
end interface
contains
function rotation_generic_cs(cp, sp, n) result(a)
real :: a
real, intent(in) :: cp, sp
real, dimension(3), intent(in) :: n
integer :: i,j
a= - sp*dot_product(epsilon_three(i,j,:), n) &
& + cp*cp + (1-cp)*n(i)*n(j)
end function rotation_generic_cs
end module lorentz
=======================================================
[troban@aqua] /tmp/gfortcrash2 $ gfortran -c lorentz_red2.f90
lorentz.f90: In function rotation_generic_cs:
lorentz.f90:17: internal compiler error: in gfc_conv_expr_op, at
fortran/trans-expr.c:1109
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
--
Summary: segmentation falut when compiling certain code
Product: gcc
Version: 4.3.0
Status: UNCONFIRMED
Severity: major
Priority: P3
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: trumsko at yahoo dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30224
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug fortran/30224] segmentation falut when compiling certain code
2006-12-15 18:02 [Bug fortran/30224] New: segmentation falut when compiling certain code trumsko at yahoo dot com
2006-12-15 18:05 ` [Bug fortran/30224] " trumsko at yahoo dot com
@ 2006-12-15 18:05 ` pinskia at gcc dot gnu dot org
2006-12-15 19:39 ` jvdelisle at gcc dot gnu dot org
2006-12-19 17:21 ` [Bug fortran/30224] [4.1 only] " pault at gcc dot gnu dot org
3 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-12-15 18:05 UTC (permalink / raw)
To: gcc-bugs
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Severity|major |normal
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30224
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug fortran/30224] segmentation falut when compiling certain code
2006-12-15 18:02 [Bug fortran/30224] New: segmentation falut when compiling certain code trumsko at yahoo dot com
@ 2006-12-15 18:05 ` trumsko at yahoo dot com
2006-12-15 18:05 ` pinskia at gcc dot gnu dot org
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: trumsko at yahoo dot com @ 2006-12-15 18:05 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from trumsko at yahoo dot com 2006-12-15 18:04 -------
Created an attachment (id=12815)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=12815&action=view)
full 'real life' code producing segfault
unpack and execute
gfortran -c kinds.f90 constants.f90 lorentz.f90
to reproduce segmentation violation
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30224
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug fortran/30224] segmentation falut when compiling certain code
2006-12-15 18:02 [Bug fortran/30224] New: segmentation falut when compiling certain code trumsko at yahoo dot com
2006-12-15 18:05 ` [Bug fortran/30224] " trumsko at yahoo dot com
2006-12-15 18:05 ` pinskia at gcc dot gnu dot org
@ 2006-12-15 19:39 ` jvdelisle at gcc dot gnu dot org
2006-12-19 17:21 ` [Bug fortran/30224] [4.1 only] " pault at gcc dot gnu dot org
3 siblings, 0 replies; 5+ messages in thread
From: jvdelisle at gcc dot gnu dot org @ 2006-12-15 19:39 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from jvdelisle at gcc dot gnu dot org 2006-12-15 19:39 -------
I can confirm this with gcc version 4.1.1 20061011
However, with svn trunk updated and bootstrapped today, I get no errors.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30224
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug fortran/30224] [4.1 only] segmentation falut when compiling certain code
2006-12-15 18:02 [Bug fortran/30224] New: segmentation falut when compiling certain code trumsko at yahoo dot com
` (2 preceding siblings ...)
2006-12-15 19:39 ` jvdelisle at gcc dot gnu dot org
@ 2006-12-19 17:21 ` pault at gcc dot gnu dot org
3 siblings, 0 replies; 5+ messages in thread
From: pault at gcc dot gnu dot org @ 2006-12-19 17:21 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from pault at gcc dot gnu dot org 2006-12-19 17:21 -------
Troban,
This compiles fine with versions 4.2 and 4.3 of gfortran. I have reproduced
the fault with 4.1. However, it is more now than we can do to keep all three
versions synchronised. I am going to mark this as resolved and ask you to
upgrade your version of gcc - your life will improve enormously!
You can get binaries for most platforms from the gfortran wiki.
Thanks for the report
Paul Thomas
--
pault at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |FIXED
Summary|segmentation falut when |[4.1 only] segmentation
|compiling certain code |falut when compiling certain
| |code
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30224
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2006-12-19 17:21 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-12-15 18:02 [Bug fortran/30224] New: segmentation falut when compiling certain code trumsko at yahoo dot com
2006-12-15 18:05 ` [Bug fortran/30224] " trumsko at yahoo dot com
2006-12-15 18:05 ` pinskia at gcc dot gnu dot org
2006-12-15 19:39 ` jvdelisle at gcc dot gnu dot org
2006-12-19 17:21 ` [Bug fortran/30224] [4.1 only] " pault at gcc dot gnu dot 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).