public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/35952] New: Segmentation fault with character strings only when compiling with -funroll-loops and -O3
@ 2008-04-16 5:34 john dot young at jrc dot co dot jp
2008-04-16 5:35 ` [Bug fortran/35952] " john dot young at jrc dot co dot jp
` (8 more replies)
0 siblings, 9 replies; 10+ messages in thread
From: john dot young at jrc dot co dot jp @ 2008-04-16 5:34 UTC (permalink / raw)
To: gcc-bugs
I attached a short code that produces segmentation faults (or strange cygwin
errors). The segmentation faults only occur when compiling with both
-funroll-loops and -O3. If one or the other or neither are used, the program
runs fine. The code has several examples. I attached a stackdump for the case
of the three write statements.
System : WinXP, cygwin, gcc version 4.3.0 20080212 (experimental)
==============================
subroutine test_sub(label)
character(len=*),intent(in) :: label
character (len=(len(label)+20)) :: c1
character (len=(len(label)+20)) :: c2
character (len=(len(label)+20)) :: c3
! the below 3 lines cause a segmentation fault
! print*, len(c1)
! print*, len(c2)
! print*, len(c3)
! the below 2 lines produce strange cygwin errors
! a ### sig_send: wait for sig_complete event failed, signal -34, rc
-1, Win32 error 6
! print*, len(c1)
! print*, len(c2)
! the below 1 lines produces no problem
! print*, len(c3)
! the below 3 lines cause a segmentation fault (I gave the stackdump for this
case)
write(c1,'(A)') 'a'
write(c2,'(A)') 'b'
write(c3,'(A)') 'c'
! the below 2 lines produce strange cygwin erros
! a ### sig_send: wait for sig_complete event failed, signal -34, rc
-1, Win32 error 6
! write(c1,'(A)') 'a'
! write(c2,'(A)') 'b'
! the below 1 lines produces no problem
! write(c1,'(A)') 'a'
end subroutine test_sub
!======================
program test
call test_sub('a')
print*, 'done'
end program test
!======================
--
Summary: Segmentation fault with character strings only when
compiling with -funroll-loops and -O3
Product: gcc
Version: 4.3.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: john dot young at jrc dot co dot jp
GCC target triplet: i686-pc-cywgin
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35952
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug fortran/35952] Segmentation fault with character strings only when compiling with -funroll-loops and -O3
2008-04-16 5:34 [Bug fortran/35952] New: Segmentation fault with character strings only when compiling with -funroll-loops and -O3 john dot young at jrc dot co dot jp
@ 2008-04-16 5:35 ` john dot young at jrc dot co dot jp
2008-04-16 5:35 ` john dot young at jrc dot co dot jp
` (7 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: john dot young at jrc dot co dot jp @ 2008-04-16 5:35 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from john dot young at jrc dot co dot jp 2008-04-16 05:34 -------
Created an attachment (id=15483)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=15483&action=view)
stackdump for the case of three writes
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35952
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug fortran/35952] Segmentation fault with character strings only when compiling with -funroll-loops and -O3
2008-04-16 5:34 [Bug fortran/35952] New: Segmentation fault with character strings only when compiling with -funroll-loops and -O3 john dot young at jrc dot co dot jp
2008-04-16 5:35 ` [Bug fortran/35952] " john dot young at jrc dot co dot jp
@ 2008-04-16 5:35 ` john dot young at jrc dot co dot jp
2008-04-16 18:16 ` tkoenig at gcc dot gnu dot org
` (6 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: john dot young at jrc dot co dot jp @ 2008-04-16 5:35 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from john dot young at jrc dot co dot jp 2008-04-16 05:34 -------
Created an attachment (id=15482)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=15482&action=view)
Code that exhibits segmentation fault.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35952
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug fortran/35952] Segmentation fault with character strings only when compiling with -funroll-loops and -O3
2008-04-16 5:34 [Bug fortran/35952] New: Segmentation fault with character strings only when compiling with -funroll-loops and -O3 john dot young at jrc dot co dot jp
2008-04-16 5:35 ` [Bug fortran/35952] " john dot young at jrc dot co dot jp
2008-04-16 5:35 ` john dot young at jrc dot co dot jp
@ 2008-04-16 18:16 ` tkoenig at gcc dot gnu dot org
2008-08-08 21:45 ` jv244 at cam dot ac dot uk
` (5 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: tkoenig at gcc dot gnu dot org @ 2008-04-16 18:16 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from tkoenig at gcc dot gnu dot org 2008-04-16 18:15 -------
I cannot reproduce this on i686-pc-linux-gnu; valgrind
shows no errors.
This may be target specific.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35952
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug fortran/35952] Segmentation fault with character strings only when compiling with -funroll-loops and -O3
2008-04-16 5:34 [Bug fortran/35952] New: Segmentation fault with character strings only when compiling with -funroll-loops and -O3 john dot young at jrc dot co dot jp
` (2 preceding siblings ...)
2008-04-16 18:16 ` tkoenig at gcc dot gnu dot org
@ 2008-08-08 21:45 ` jv244 at cam dot ac dot uk
2008-11-01 12:48 ` jvdelisle at gcc dot gnu dot org
` (4 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: jv244 at cam dot ac dot uk @ 2008-08-08 21:45 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from jv244 at cam dot ac dot uk 2008-08-08 21:43 -------
also works without problems on x86_64 (linux)
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35952
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug fortran/35952] Segmentation fault with character strings only when compiling with -funroll-loops and -O3
2008-04-16 5:34 [Bug fortran/35952] New: Segmentation fault with character strings only when compiling with -funroll-loops and -O3 john dot young at jrc dot co dot jp
` (3 preceding siblings ...)
2008-08-08 21:45 ` jv244 at cam dot ac dot uk
@ 2008-11-01 12:48 ` jvdelisle at gcc dot gnu dot org
2009-03-28 13:06 ` fxcoudert at gcc dot gnu dot org
` (3 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: jvdelisle at gcc dot gnu dot org @ 2008-11-01 12:48 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from jvdelisle at gcc dot gnu dot org 2008-11-01 12:47 -------
Confirmed. On trunk R 141238. I can't get a very usable backtrace on this.
Maybe valgind will give us a hint on Linux box. This could also be a
Cygwin.dll issue.
--
jvdelisle at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2008-11-01 12:47:05
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35952
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug fortran/35952] Segmentation fault with character strings only when compiling with -funroll-loops and -O3
2008-04-16 5:34 [Bug fortran/35952] New: Segmentation fault with character strings only when compiling with -funroll-loops and -O3 john dot young at jrc dot co dot jp
` (4 preceding siblings ...)
2008-11-01 12:48 ` jvdelisle at gcc dot gnu dot org
@ 2009-03-28 13:06 ` fxcoudert at gcc dot gnu dot org
2009-10-04 21:25 ` jvdelisle at gcc dot gnu dot org
` (2 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2009-03-28 13:06 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from fxcoudert at gcc dot gnu dot org 2009-03-28 13:06 -------
(In reply to comment #5)
> I can't get a very usable backtrace on this.
> Maybe valgind will give us a hint on Linux box.
With current trunk, valgrind on x86_64-linux reports nothing (tried both -m32
and -m64).
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35952
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug fortran/35952] Segmentation fault with character strings only when compiling with -funroll-loops and -O3
2008-04-16 5:34 [Bug fortran/35952] New: Segmentation fault with character strings only when compiling with -funroll-loops and -O3 john dot young at jrc dot co dot jp
` (5 preceding siblings ...)
2009-03-28 13:06 ` fxcoudert at gcc dot gnu dot org
@ 2009-10-04 21:25 ` jvdelisle at gcc dot gnu dot org
2009-10-14 1:10 ` jvdelisle at gcc dot gnu dot org
2009-10-14 1:49 ` jvdelisle at gcc dot gnu dot org
8 siblings, 0 replies; 10+ messages in thread
From: jvdelisle at gcc dot gnu dot org @ 2009-10-04 21:25 UTC (permalink / raw)
To: gcc-bugs
------- Comment #7 from jvdelisle at gcc dot gnu dot org 2009-10-04 21:25 -------
Assigning to myself only to remind me to investigate to see where this stands
now.
--
jvdelisle at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |jvdelisle at gcc dot gnu dot
|dot org |org
Status|NEW |ASSIGNED
Last reconfirmed|2008-11-01 12:47:05 |2009-10-04 21:25:02
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35952
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug fortran/35952] Segmentation fault with character strings only when compiling with -funroll-loops and -O3
2008-04-16 5:34 [Bug fortran/35952] New: Segmentation fault with character strings only when compiling with -funroll-loops and -O3 john dot young at jrc dot co dot jp
` (6 preceding siblings ...)
2009-10-04 21:25 ` jvdelisle at gcc dot gnu dot org
@ 2009-10-14 1:10 ` jvdelisle at gcc dot gnu dot org
2009-10-14 1:49 ` jvdelisle at gcc dot gnu dot org
8 siblings, 0 replies; 10+ messages in thread
From: jvdelisle at gcc dot gnu dot org @ 2009-10-14 1:10 UTC (permalink / raw)
To: gcc-bugs
------- Comment #8 from jvdelisle at gcc dot gnu dot org 2009-10-14 01:09 -------
With gfortran 4.5 trunk r152402 on Cygwin 1.7 the test case executes normally.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35952
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug fortran/35952] Segmentation fault with character strings only when compiling with -funroll-loops and -O3
2008-04-16 5:34 [Bug fortran/35952] New: Segmentation fault with character strings only when compiling with -funroll-loops and -O3 john dot young at jrc dot co dot jp
` (7 preceding siblings ...)
2009-10-14 1:10 ` jvdelisle at gcc dot gnu dot org
@ 2009-10-14 1:49 ` jvdelisle at gcc dot gnu dot org
8 siblings, 0 replies; 10+ messages in thread
From: jvdelisle at gcc dot gnu dot org @ 2009-10-14 1:49 UTC (permalink / raw)
To: gcc-bugs
------- Comment #9 from jvdelisle at gcc dot gnu dot org 2009-10-14 01:49 -------
Closing. Works on latest gfortran. Upgrade to later version.
--
jvdelisle at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |WORKSFORME
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35952
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2009-10-14 1:49 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-04-16 5:34 [Bug fortran/35952] New: Segmentation fault with character strings only when compiling with -funroll-loops and -O3 john dot young at jrc dot co dot jp
2008-04-16 5:35 ` [Bug fortran/35952] " john dot young at jrc dot co dot jp
2008-04-16 5:35 ` john dot young at jrc dot co dot jp
2008-04-16 18:16 ` tkoenig at gcc dot gnu dot org
2008-08-08 21:45 ` jv244 at cam dot ac dot uk
2008-11-01 12:48 ` jvdelisle at gcc dot gnu dot org
2009-03-28 13:06 ` fxcoudert at gcc dot gnu dot org
2009-10-04 21:25 ` jvdelisle at gcc dot gnu dot org
2009-10-14 1:10 ` jvdelisle at gcc dot gnu dot org
2009-10-14 1:49 ` jvdelisle 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).