This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/36967] New: segfault in is_gimple_real_type with -fpredictive-commoning -ffast-math
- From: "janis at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 29 Jul 2008 21:00:54 -0000
- Subject: [Bug tree-optimization/36967] New: segfault in is_gimple_real_type with -fpredictive-commoning -ffast-math
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
After the merge of the tuples branch GCC segfaults on a Fortran benchmark with
lots of calculations involving three-dimensional arrays in nested loops. This
testcase reproduces the problem when compiled on powerpc-linux with "-O2
-ffast-math -fpredictive-commoning":
subroutine foo(x,y,n)
integer n
real*8 y(n,n,n),x(n,n,n)
integer k, j, i
do k = 2, n-1
do j = 2, n-1
do I = 2, n-1
y(i,j,k) = y(i,j,k)
+ + (x(i-1,j-1,k)
+ + x(i,j-1,k-1)
+ + x(i,j+1,k-1)
+ + x(i,j+1,k+1)
+ + x(i+1,j,k+1))
+ + (x(i-1,j-1,k-1)
+ + x(i+1,j-1,k-1)
+ + x(i-1,j+1,k-1)
+ + x(i+1,j+1,k-1)
+ + x(i-1,j+1,k+1)
+ + x(i+1,j+1,k+1))
enddo
enddo
enddo
return
Here's some of the stack trace:
#0 0x103a60f0 in is_gimple_reg_type (type=0x0)
at /home/janis/gcc_trunk_anonsvn/gcc/gcc/gimple.c:2867
#1 0x103a66e8 in is_gimple_val (t=0xf7f152c0)
at /home/janis/gcc_trunk_anonsvn/gcc/gcc/gimple.c:2968
#2 0x103a0408 in gimple_assign_copy_p (gs=0xf7eeca40)
at /home/janis/gcc_trunk_anonsvn/gcc/gcc/gimple.c:1848
#3 0x106357a4 in remove_stmt (stmt=0xf7ee4880)
at /home/janis/gcc_trunk_anonsvn/gcc/gcc/tree-predcom.c:1709
#4 0x10635910 in execute_pred_commoning_chain (loop=0xf7ee6e70,
chain=0x10f1edf0, tmp_vars=0x10ef45dc)
at /home/janis/gcc_trunk_anonsvn/gcc/gcc/tree-predcom.c:1756
#5 0x10635ce0 in execute_pred_commoning (loop=0xf7ee6e70, chains=0x10f1ef50,
tmp_vars=0x10ef45dc)
at /home/janis/gcc_trunk_anonsvn/gcc/gcc/tree-predcom.c:1821
#6 0x10636078 in execute_pred_commoning_cbck (loop=0xf7ee6e70,
data=0xff8afc30)
at /home/janis/gcc_trunk_anonsvn/gcc/gcc/tree-predcom.c:1886
#7 0x107057ec in tree_transform_and_unroll_loop (loop=0xf7ee6e70, factor=2,
exit=0xf7ef0600, desc=0xff8afbf8,
transform=0x10636024 <execute_pred_commoning_cbck>, data=0xff8afc30)
at /home/janis/gcc_trunk_anonsvn/gcc/gcc/tree-ssa-loop-manip.c:1014
#8 0x106398b8 in tree_predictive_commoning_loop (loop=0xf7ee6e70)
at /home/janis/gcc_trunk_anonsvn/gcc/gcc/tree-predcom.c:2617
Notice that the pointer passed to is_gimple_reg_type is NULL; it's not
expecting that.
--
Summary: segfault in is_gimple_real_type with -fpredictive-
commoning -ffast-math
Product: gcc
Version: 4.4.0
Status: UNCONFIRMED
Keywords: ice-on-valid-code
Severity: normal
Priority: P3
Component: tree-optimization
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: janis at gcc dot gnu dot org
GCC target triplet: powerpc-unknown-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36967