public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/39318] internal compiler error: verify_stmts failed
  2009-02-27 18:03 [Bug fortran/39318] New: internal compiler error: verify_stmts failed deji_aking at yahoo dot ca
@ 2009-02-27 18:03 ` deji_aking at yahoo dot ca
  2009-02-27 18:25 ` dominiq at lps dot ens dot fr
                   ` (11 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: deji_aking at yahoo dot ca @ 2009-02-27 18:03 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from deji_aking at yahoo dot ca  2009-02-27 18:03 -------
Created an attachment (id=17371)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=17371&action=view)
Fortran file that produce the ICE


-- 


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


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

* [Bug fortran/39318]  New: internal compiler error: verify_stmts failed
@ 2009-02-27 18:03 deji_aking at yahoo dot ca
  2009-02-27 18:03 ` [Bug fortran/39318] " deji_aking at yahoo dot ca
                   ` (12 more replies)
  0 siblings, 13 replies; 14+ messages in thread
From: deji_aking at yahoo dot ca @ 2009-02-27 18:03 UTC (permalink / raw)
  To: gcc-bugs

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1053 bytes --]

The attached code produce an ICE (below) with cuurent trunk when the compiler
option includes all of '-fno-second-underscore -fexceptions -O3'. The code
compiles fine with gfortran-4.3.2.

..
[deji@logos gemclim33]$ gfc -c -m64 -fPIC -fcray-pointer -fconvert=big-endian
-fopenmp -fno-second-underscore -fexceptions -O3 adw_trajsp.f
adw_trajsp.f: In function ‘adw_trajsp_.omp_fn.0’:
adw_trajsp.f:459: error: Dead STMT in EH table
D.3244_455 = __builtin_sqrtf (D.3243_454);

adw_trajsp.f:459: internal compiler error: verify_stmts failed
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
..


-- 
           Summary: internal compiler error: verify_stmts failed
           Product: gcc
           Version: 4.4.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: deji_aking at yahoo dot ca


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


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

* [Bug fortran/39318] internal compiler error: verify_stmts failed
  2009-02-27 18:03 [Bug fortran/39318] New: internal compiler error: verify_stmts failed deji_aking at yahoo dot ca
  2009-02-27 18:03 ` [Bug fortran/39318] " deji_aking at yahoo dot ca
@ 2009-02-27 18:25 ` dominiq at lps dot ens dot fr
  2009-02-27 19:03 ` [Bug middle-end/39318] " dominiq at lps dot ens dot fr
                   ` (10 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: dominiq at lps dot ens dot fr @ 2009-02-27 18:25 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from dominiq at lps dot ens dot fr  2009-02-27 18:24 -------
Confirmed oni686-apple-darwin9 with

gfc -c -fcray-pointer -fexceptions -O2 -ftree-vectorize adw_trajsp.f


-- 


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


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

* [Bug middle-end/39318] internal compiler error: verify_stmts failed
  2009-02-27 18:03 [Bug fortran/39318] New: internal compiler error: verify_stmts failed deji_aking at yahoo dot ca
  2009-02-27 18:03 ` [Bug fortran/39318] " deji_aking at yahoo dot ca
  2009-02-27 18:25 ` dominiq at lps dot ens dot fr
@ 2009-02-27 19:03 ` dominiq at lps dot ens dot fr
  2009-02-27 19:59 ` dominiq at lps dot ens dot fr
                   ` (9 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: dominiq at lps dot ens dot fr @ 2009-02-27 19:03 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from dominiq at lps dot ens dot fr  2009-02-27 19:03 -------
Forgot to say that it is a [4.4 Regression].


-- 


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


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

* [Bug middle-end/39318] internal compiler error: verify_stmts failed
  2009-02-27 18:03 [Bug fortran/39318] New: internal compiler error: verify_stmts failed deji_aking at yahoo dot ca
                   ` (2 preceding siblings ...)
  2009-02-27 19:03 ` [Bug middle-end/39318] " dominiq at lps dot ens dot fr
@ 2009-02-27 19:59 ` dominiq at lps dot ens dot fr
  2009-02-28 11:18 ` dominiq at lps dot ens dot fr
                   ` (8 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: dominiq at lps dot ens dot fr @ 2009-02-27 19:59 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from dominiq at lps dot ens dot fr  2009-02-27 19:59 -------
Reduced test:

      subroutine adw_trajsp ( F_lon, F_lat, F_x, F_y, F_z,
     %                        F_u, F_v, F_dt,i0,in,j0,jn)
      implicit none
      real F_lon(*),F_lat(*),F_x(*),F_y(*),F_z(*),F_u(*),F_v(*),F_dt
      integer i0,in,j0,jn
      integer n, ij, nij,vnij, i,j,k
      real*8 xsin(i0:in,j0:jn)
!$omp parallel do private(xsin)
         do j=j0,jn
         do i=i0,in
            xsin(i,j) = sqrt( F_u(n) ** 2 + F_v(n) ** 2 ) * F_dt
         end do
         end do
!$omp end parallel do
      return
      end

ibook-dhum] f90/bug% gfc -c -fopenmp -fexceptions -O2 -ftree-vectorize
adw_trajsp_red.f
adw_trajsp_red.f: In function 'adw_trajsp_.omp_fn.0':
adw_trajsp_red.f:8: error: Dead STMT in EH table
D.1679_46 = __builtin_sqrtf (D.1678_45);

adw_trajsp_red.f:8: internal compiler error: verify_stmts failed


-- 


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


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

* [Bug middle-end/39318] internal compiler error: verify_stmts failed
  2009-02-27 18:03 [Bug fortran/39318] New: internal compiler error: verify_stmts failed deji_aking at yahoo dot ca
                   ` (3 preceding siblings ...)
  2009-02-27 19:59 ` dominiq at lps dot ens dot fr
@ 2009-02-28 11:18 ` dominiq at lps dot ens dot fr
  2009-03-01 10:34 ` irar at il dot ibm dot com
                   ` (7 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: dominiq at lps dot ens dot fr @ 2009-02-28 11:18 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from dominiq at lps dot ens dot fr  2009-02-28 11:17 -------
The compilation flags in comment #2 should be 

gfc -c -fopenmp -fcray-pointer -fexceptions -O2 -ftree-vectorize adw_trajsp.f

in order to get the ICE. The code compiles without -fopenmp.

The code compiles with the flags in comments #0 or with "-c -fopenmp
-fcray-pointer -fexceptions -O2 -ftree-vectorize" on powerpc-apple-darwin9.


-- 


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


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

* [Bug middle-end/39318] internal compiler error: verify_stmts failed
  2009-02-27 18:03 [Bug fortran/39318] New: internal compiler error: verify_stmts failed deji_aking at yahoo dot ca
                   ` (4 preceding siblings ...)
  2009-02-28 11:18 ` dominiq at lps dot ens dot fr
@ 2009-03-01 10:34 ` irar at il dot ibm dot com
  2009-03-01 10:58 ` rguenther at suse dot de
                   ` (6 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: irar at il dot ibm dot com @ 2009-03-01 10:34 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from irar at il dot ibm dot com  2009-03-01 10:34 -------
Reduced it a bit more:

      subroutine adw_trajsp (F_u,i0,in,j0,jn)
      implicit none
      real F_u(*)
      integer i0,in,j0,jn
      integer n,i,j
      real*8 xsin(i0:in,j0:jn)
!$omp parallel do private(xsin)
         do j=j0,jn
         do i=i0,in
            xsin(i,j) = sqrt(F_u(n))
         end do
         end do
!$omp end parallel do
      return
      end

on x86_64-suse-linux with 
gfortran -c -fopenmp -fcray-pointer -fexceptions   -O2 -ftree-vectorize.

When we vectorize a function call, we replace the RHS of the stmt with
"something harmless": D.1692_41 = __builtin_sqrtf (pretmp.45_79); is replaced
with D.1692_41 = 0.0;. We don't remove the original stmt from the EH table. The
question is it OK to vectorize function that are in EH table?


-- 

irar at il dot ibm dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |rguenther at suse dot de
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
   Last reconfirmed|0000-00-00 00:00:00         |2009-03-01 10:34:19
               date|                            |


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


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

* [Bug middle-end/39318] internal compiler error: verify_stmts failed
  2009-02-27 18:03 [Bug fortran/39318] New: internal compiler error: verify_stmts failed deji_aking at yahoo dot ca
                   ` (5 preceding siblings ...)
  2009-03-01 10:34 ` irar at il dot ibm dot com
@ 2009-03-01 10:58 ` rguenther at suse dot de
  2009-03-01 11:15 ` irar at il dot ibm dot com
                   ` (5 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: rguenther at suse dot de @ 2009-03-01 10:58 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from rguenther at suse dot de  2009-03-01 10:58 -------
Subject: Re:  internal compiler error: verify_stmts
 failed

On Sun, 1 Mar 2009, irar at il dot ibm dot com wrote:

> ------- Comment #6 from irar at il dot ibm dot com  2009-03-01 10:34 -------
> Reduced it a bit more:
> 
>       subroutine adw_trajsp (F_u,i0,in,j0,jn)
>       implicit none
>       real F_u(*)
>       integer i0,in,j0,jn
>       integer n,i,j
>       real*8 xsin(i0:in,j0:jn)
> !$omp parallel do private(xsin)
>          do j=j0,jn
>          do i=i0,in
>             xsin(i,j) = sqrt(F_u(n))
>          end do
>          end do
> !$omp end parallel do
>       return
>       end
> 
> on x86_64-suse-linux with 
> gfortran -c -fopenmp -fcray-pointer -fexceptions   -O2 -ftree-vectorize.
> 
> When we vectorize a function call, we replace the RHS of the stmt with
> "something harmless": D.1692_41 = __builtin_sqrtf (pretmp.45_79); is replaced
> with D.1692_41 = 0.0;. We don't remove the original stmt from the EH table. The
> question is it OK to vectorize function that are in EH table?

Well, we should transfer the EH region information to the vectorized
statement in this case.  Which might be tricky ... do we have a link
to the original statement when producing the new one?

Richard.


-- 


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


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

* [Bug middle-end/39318] internal compiler error: verify_stmts failed
  2009-02-27 18:03 [Bug fortran/39318] New: internal compiler error: verify_stmts failed deji_aking at yahoo dot ca
                   ` (6 preceding siblings ...)
  2009-03-01 10:58 ` rguenther at suse dot de
@ 2009-03-01 11:15 ` irar at il dot ibm dot com
  2009-03-01 11:32 ` rguenther at suse dot de
                   ` (4 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: irar at il dot ibm dot com @ 2009-03-01 11:15 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #8 from irar at il dot ibm dot com  2009-03-01 11:15 -------
(In reply to comment #7)
> > question is it OK to vectorize function that are in EH table?
> Well, we should transfer the EH region information to the vectorized
> statement in this case.  Which might be tricky ... do we have a link
> to the original statement when producing the new one?

We have the original scalar stmt (gimple).

Thanks,
Ira

> Richard.


-- 


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


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

* [Bug middle-end/39318] internal compiler error: verify_stmts failed
  2009-02-27 18:03 [Bug fortran/39318] New: internal compiler error: verify_stmts failed deji_aking at yahoo dot ca
                   ` (7 preceding siblings ...)
  2009-03-01 11:15 ` irar at il dot ibm dot com
@ 2009-03-01 11:32 ` rguenther at suse dot de
  2009-03-01 12:27 ` irar at il dot ibm dot com
                   ` (3 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: rguenther at suse dot de @ 2009-03-01 11:32 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #9 from rguenther at suse dot de  2009-03-01 11:32 -------
Subject: Re:  internal compiler error: verify_stmts
 failed

On Sun, 1 Mar 2009, irar at il dot ibm dot com wrote:

> ------- Comment #8 from irar at il dot ibm dot com  2009-03-01 11:15 -------
> (In reply to comment #7)
> > > question is it OK to vectorize function that are in EH table?
> > Well, we should transfer the EH region information to the vectorized
> > statement in this case.  Which might be tricky ... do we have a link
> > to the original statement when producing the new one?
> 
> We have the original scalar stmt (gimple).

Ok.  Then

  if (maybe_clean_or_replace_eh_stmt (old_stmt, new_stmt))
    gimple_purge_dead_eh_edges (bb);

should be enough to fix this.

Richard.


-- 


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


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

* [Bug middle-end/39318] internal compiler error: verify_stmts failed
  2009-02-27 18:03 [Bug fortran/39318] New: internal compiler error: verify_stmts failed deji_aking at yahoo dot ca
                   ` (8 preceding siblings ...)
  2009-03-01 11:32 ` rguenther at suse dot de
@ 2009-03-01 12:27 ` irar at il dot ibm dot com
  2009-03-01 17:51 ` [Bug middle-end/39318] [4.4 Regression] " pinskia at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  12 siblings, 0 replies; 14+ messages in thread
From: irar at il dot ibm dot com @ 2009-03-01 12:27 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #10 from irar at il dot ibm dot com  2009-03-01 12:27 -------
(In reply to comment #9)
> Ok.  Then
>   if (maybe_clean_or_replace_eh_stmt (old_stmt, new_stmt))
>     gimple_purge_dead_eh_edges (bb);
> should be enough to fix this.
> Richard.

Yes, it fixes the ICE. Thanks! I'll submit a patch after testing.

Thanks,
Ira


-- 


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


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

* [Bug middle-end/39318] [4.4 Regression] internal compiler error: verify_stmts failed
  2009-02-27 18:03 [Bug fortran/39318] New: internal compiler error: verify_stmts failed deji_aking at yahoo dot ca
                   ` (9 preceding siblings ...)
  2009-03-01 12:27 ` irar at il dot ibm dot com
@ 2009-03-01 17:51 ` pinskia at gcc dot gnu dot org
  2009-03-02 11:52 ` irar at gcc dot gnu dot org
  2009-03-02 13:38 ` rguenth at gcc dot gnu dot org
  12 siblings, 0 replies; 14+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2009-03-01 17:51 UTC (permalink / raw)
  To: gcc-bugs



-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |ice-on-valid-code
            Summary|internal compiler error:    |[4.4 Regression] internal
                   |verify_stmts failed         |compiler error: verify_stmts
                   |                            |failed
   Target Milestone|---                         |4.4.0


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


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

* [Bug middle-end/39318] [4.4 Regression] internal compiler error: verify_stmts failed
  2009-02-27 18:03 [Bug fortran/39318] New: internal compiler error: verify_stmts failed deji_aking at yahoo dot ca
                   ` (10 preceding siblings ...)
  2009-03-01 17:51 ` [Bug middle-end/39318] [4.4 Regression] " pinskia at gcc dot gnu dot org
@ 2009-03-02 11:52 ` irar at gcc dot gnu dot org
  2009-03-02 13:38 ` rguenth at gcc dot gnu dot org
  12 siblings, 0 replies; 14+ messages in thread
From: irar at gcc dot gnu dot org @ 2009-03-02 11:52 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #11 from irar at gcc dot gnu dot org  2009-03-02 11:52 -------
Subject: Bug 39318

Author: irar
Date: Mon Mar  2 11:52:15 2009
New Revision: 144541

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=144541
Log:
2009-03-02  Richard Guenther  <rguenther@suse.de>
            Ira Rosen  <irar@il.ibm.com>

        PR tree-optimization/39318
        * tree-vect-transform.c (vectorizable_call): Transfer the EH region
        information to the vectorized statement.


Added:
    trunk/gcc/testsuite/gfortran.dg/vect/pr39318.f90
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/tree-vect-transform.c


-- 


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


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

* [Bug middle-end/39318] [4.4 Regression] internal compiler error: verify_stmts failed
  2009-02-27 18:03 [Bug fortran/39318] New: internal compiler error: verify_stmts failed deji_aking at yahoo dot ca
                   ` (11 preceding siblings ...)
  2009-03-02 11:52 ` irar at gcc dot gnu dot org
@ 2009-03-02 13:38 ` rguenth at gcc dot gnu dot org
  12 siblings, 0 replies; 14+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2009-03-02 13:38 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #12 from rguenth at gcc dot gnu dot org  2009-03-02 13:38 -------
Fixed.


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED


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


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

end of thread, other threads:[~2009-03-02 13:38 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-02-27 18:03 [Bug fortran/39318] New: internal compiler error: verify_stmts failed deji_aking at yahoo dot ca
2009-02-27 18:03 ` [Bug fortran/39318] " deji_aking at yahoo dot ca
2009-02-27 18:25 ` dominiq at lps dot ens dot fr
2009-02-27 19:03 ` [Bug middle-end/39318] " dominiq at lps dot ens dot fr
2009-02-27 19:59 ` dominiq at lps dot ens dot fr
2009-02-28 11:18 ` dominiq at lps dot ens dot fr
2009-03-01 10:34 ` irar at il dot ibm dot com
2009-03-01 10:58 ` rguenther at suse dot de
2009-03-01 11:15 ` irar at il dot ibm dot com
2009-03-01 11:32 ` rguenther at suse dot de
2009-03-01 12:27 ` irar at il dot ibm dot com
2009-03-01 17:51 ` [Bug middle-end/39318] [4.4 Regression] " pinskia at gcc dot gnu dot org
2009-03-02 11:52 ` irar at gcc dot gnu dot org
2009-03-02 13:38 ` rguenth 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).