public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/40349]  New: compiler crash with -O3
@ 2009-06-05  9:25 pierphil at xs4all dot nl
  2009-06-05  9:55 ` [Bug fortran/40349] " dominiq at lps dot ens dot fr
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: pierphil at xs4all dot nl @ 2009-06-05  9:25 UTC (permalink / raw)
  To: gcc-bugs

When I compile the subroutine (pasted at the end of this report) with

 gfortran -c -ffree-form -O3  bug.f90

The compiler crashes with the output

bug.f90: In function 'subbug':
bug.f90:1: internal compiler error: in compare_values_warnv, at tree-vrp.c:1031
Please submit a full bug report,
with preprocessed source if appropriate.



It does not crash with -O2

This is my compiler version

gfortran -v                         
Using built-in specs.
Target: i386-apple-darwin9.4.0
Configured with: ../gcc-4.4-20080801/configure --enable-languages=fortran
Thread model: posix
gcc version 4.4.0 20080801 (experimental) (GCC) 

Finally here is the subroutine "bug.f90"

subroutine subbug(data, n1,n2,n3)

   implicit none   

   integer(kind(1)) :: i,j,k, ngr, n1,n2,n3
   real(kind(1.0d0)) ::  data((n1+2)*n2*n3)

   ngr = n1*n2*n3

   data(2:ngr+2*n2*n3:2) = -data(2:ngr+2*n2*n3:2)
   data = RESHAPE((/                                                     &
            (((data(i+(j-1)*n1+(k-1)*n1*n2),i=1, n1),                   &
               data(ngr+1+(j-1)*2+(k-1)*2*n2),                          &
               data(ngr+2+(j-1)*2+(k-1)*2*n2),j=1,n2),k=1,n3 )          &
                                /),SHAPE=(/ngr+2*n2*n3/))


end subroutine subbug


-- 
           Summary: compiler crash with -O3
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: pierphil at xs4all dot nl


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40349


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug fortran/40349] compiler crash with -O3
  2009-06-05  9:25 [Bug fortran/40349] New: compiler crash with -O3 pierphil at xs4all dot nl
@ 2009-06-05  9:55 ` dominiq at lps dot ens dot fr
  2009-06-07 19:20 ` fxcoudert at gcc dot gnu dot org
  2009-06-09 13:25 ` pierphil at xs4all dot nl
  2 siblings, 0 replies; 4+ messages in thread
From: dominiq at lps dot ens dot fr @ 2009-06-05  9:55 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from dominiq at lps dot ens dot fr  2009-06-05 09:54 -------
Works on me on (powerpc|i686)-apple-darwin9 (10.5.7) on trunk, 4.4.0, 4.4.1,
4.3.3, and 4.2.3 with or without -m64.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40349


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug fortran/40349] compiler crash with -O3
  2009-06-05  9:25 [Bug fortran/40349] New: compiler crash with -O3 pierphil at xs4all dot nl
  2009-06-05  9:55 ` [Bug fortran/40349] " dominiq at lps dot ens dot fr
@ 2009-06-07 19:20 ` fxcoudert at gcc dot gnu dot org
  2009-06-09 13:25 ` pierphil at xs4all dot nl
  2 siblings, 0 replies; 4+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2009-06-07 19:20 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from fxcoudert at gcc dot gnu dot org  2009-06-07 19:20 -------
Also works for me on newer versions. This is very likely PR 36817. Please try a
more recent compiler and reopen this bug if it persists.


-- 

fxcoudert at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |fxcoudert at gcc dot gnu dot
                   |                            |org
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |FIXED


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40349


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug fortran/40349] compiler crash with -O3
  2009-06-05  9:25 [Bug fortran/40349] New: compiler crash with -O3 pierphil at xs4all dot nl
  2009-06-05  9:55 ` [Bug fortran/40349] " dominiq at lps dot ens dot fr
  2009-06-07 19:20 ` fxcoudert at gcc dot gnu dot org
@ 2009-06-09 13:25 ` pierphil at xs4all dot nl
  2 siblings, 0 replies; 4+ messages in thread
From: pierphil at xs4all dot nl @ 2009-06-09 13:25 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from pierphil at xs4all dot nl  2009-06-09 13:25 -------
(In reply to comment #2)
> Also works for me on newer versions. This is very likely PR 36817. Please try a
> more recent compiler and reopen this bug if it persists.
> 

I managed to install the 4.4.0 version and that fixed it. Thanks.


-- 

pierphil at xs4all dot nl changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |pierphil at xs4all dot nl


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40349


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-06-09 13:25 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-06-05  9:25 [Bug fortran/40349] New: compiler crash with -O3 pierphil at xs4all dot nl
2009-06-05  9:55 ` [Bug fortran/40349] " dominiq at lps dot ens dot fr
2009-06-07 19:20 ` fxcoudert at gcc dot gnu dot org
2009-06-09 13:25 ` pierphil at xs4all dot nl

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).