[Bug middle-end/39318] internal compiler error: verify_stmts failed

2009-02-27 Thread dominiq at lps dot ens dot fr


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



[Bug middle-end/39318] internal compiler error: verify_stmts failed

2009-02-27 Thread dominiq at lps dot ens dot fr


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



[Bug middle-end/39318] internal compiler error: verify_stmts failed

2009-02-28 Thread dominiq at lps dot ens dot fr


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



[Bug middle-end/39318] internal compiler error: verify_stmts failed

2009-03-01 Thread irar at il dot ibm dot com


--- 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|-00-00 00:00:00 |2009-03-01 10:34:19
   date||


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



[Bug middle-end/39318] internal compiler error: verify_stmts failed

2009-03-01 Thread rguenther at suse dot de


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



[Bug middle-end/39318] internal compiler error: verify_stmts failed

2009-03-01 Thread irar at il dot ibm dot com


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



[Bug middle-end/39318] internal compiler error: verify_stmts failed

2009-03-01 Thread rguenther at suse dot de


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



[Bug middle-end/39318] internal compiler error: verify_stmts failed

2009-03-01 Thread irar at il dot ibm dot com


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