public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "burnus at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug fortran/42851] New: [4.3/4.4/4.5] ICE (segfault) at gfc_trans_pointer_assignment for subpointer Date: Sat, 23 Jan 2010 17:40:00 -0000 [thread overview] Message-ID: <bug-42851-13404@http.gcc.gnu.org/bugzilla/> (raw) Found while looking again as PR 39304. The following program causes an ICE. It might well be only fixable with the new array descriptor. The program works with 4.1 and 4.2 (which might well be only by chance) but fails with 4.3/4.4/4.5 with: test.f90: In function 'func': test.f90:7:0: internal compiler error: Segmentation fault Program received signal SIGSEGV, Segmentation fault. 0x000000000055d935 in gfc_trans_pointer_assignment (expr1=0x137b4e0, expr2=0x137b970) at /home/tob/projects/gcc/gcc/fortran/trans-expr.c:4676 4676 gfc_add_modify (&lse.post, GFC_DECL_SPAN(decl), tmp); module m implicit none type t real :: a(3) end type t contains function func(x,i) type(t), target :: x(:) integer :: i real, dimension(:), pointer :: func func => x%a(i) end function func end module m use m type(t) :: mt(3) real :: res(3) mt = t(1.0) res = matmul(func(mt,1), reshape( (/1,2,3,4,5,6,7,8,9/), (/3,3 /) )) if (res(1) /= 6.0 .and. res(2) /= 15.0 .and. res(3) /= 24.0) then print *, res stop 'error' end if end -- Summary: [4.3/4.4/4.5] ICE (segfault) at gfc_trans_pointer_assignment for subpointer Product: gcc Version: 4.5.0 Status: UNCONFIRMED Keywords: ice-on-valid-code Severity: normal Priority: P3 Component: fortran AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: burnus at gcc dot gnu dot org OtherBugsDependingO 42742 nThis: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42851
next reply other threads:[~2010-01-23 17:40 UTC|newest] Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top 2010-01-23 17:40 burnus at gcc dot gnu dot org [this message] 2010-02-12 5:07 ` [Bug fortran/42851] " jvdelisle at gcc dot gnu dot org 2010-02-16 10:38 ` rguenth at gcc dot gnu dot org 2010-02-17 17:33 ` mmitchel at gcc dot gnu dot org 2010-05-18 22:10 ` [Bug fortran/42851] " dfranke at gcc dot gnu dot org 2010-05-18 22:22 ` dfranke at gcc dot gnu dot org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-42851-13404@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).