Bug 38310 - -ftree-parallelize-loops=4 causes ICE with gcc-4.3.2
Summary: -ftree-parallelize-loops=4 causes ICE with gcc-4.3.2
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: middle-end (show other bugs)
Version: 4.3.2
: P3 normal
Target Milestone: 4.4.0
Assignee: Not yet assigned to anyone
URL:
Keywords:
: 38356 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-11-28 18:19 UTC by Nick
Modified: 2008-12-24 01:09 UTC (History)
2 users (show)

See Also:
Host: x86_64-unknown-linux
Target: x86_64-unknown-linux
Build: x86_64-unknown-linux
Known to work: 4.4.0
Known to fail: 4.3.3
Last reconfirmed: 2008-11-28 20:03:55


Attachments
preprocessed input which causes ICE with -ftree-parallelize-loop=4 (26.90 KB, application/octet-stream)
2008-11-28 18:20 UTC, Nick
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Nick 2008-11-28 18:19:15 UTC
I tried to compile mplayerxp with -ftree-parallelize-loops=4 and gcc produced ICE:

gcc -m64 -c -march=amdfam10 -O3 -funroll-all-loops -ffast-math -fprefetch-loop-arrays -ftree-parallelize-loops=4 -mmmx -m3dnow -msse -msse2 -msse3 -msse4a -mabm -mcx16 -msahf  --param l1-cache-line-size=64 --param l1-cache-size=128 --param l2-cache-size=512 -mfpmath=387,sse -mfancy-math-387 -mveclibabi=acml -finline-functions-called-once -funit-at-a-time -pipe -fopenmp -fopenmp -ftree-parallelize-loops=4 -I/usr/X11/include -I/usr/X11R6/include  -W -Wall -D_REENTRANT -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D__USE_FILE_OFFSET64 -D__USE_LARGEFILE -D_LARGEFILE64_SOURCE -I. -I.. -I../../codecs/libavutil -Wall -o af_format.o af_format.c
af_format.c: In function 'play._loopfn.6':
af_format.c:382: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
Comment 1 Nick 2008-11-28 18:20:26 UTC
Created attachment 16791 [details]
preprocessed input which causes ICE with -ftree-parallelize-loop=4
Comment 2 Andrew Pinski 2008-11-28 18:43:23 UTC
Reducing.
Comment 3 Andrew Pinski 2008-11-28 18:43:38 UTC
It works on the trunk though.
Comment 4 Andrew Pinski 2008-11-28 20:03:37 UTC
Backtrace:
#0  0x00187de8 in ei_container (i={index = 0, container = 0x100}) at /Users/apinski/src/gcc-4.3/gcc/gcc/basic-block.h:674
#1  0x00187e0e in ei_end_p (i={index = 0, container = 0x100}) at /Users/apinski/src/gcc-4.3/gcc/gcc/basic-block.h:709
#2  0x00187ca4 in ei_cond (ei={index = 0, container = 0x100}, p=0xbffff06c) at /Users/apinski/src/gcc-4.3/gcc/gcc/basic-block.h:759
#3  0x0018cb43 in loop_preheader_edge (loop=0x43423660) at /Users/apinski/src/gcc-4.3/gcc/gcc/cfgloop.c:1574
#4  0x00669785 in move_computations_stmt (dw_data=0xbffff1bc, bb=0x434d6b80) at /Users/apinski/src/gcc-4.3/gcc/gcc/tree-ssa-loop-im.c:861
#5  0x00b1c5b6 in walk_dominator_tree (walk_data=0xbffff1bc, bb=0x434d6b80) at /Users/apinski/src/gcc-4.3/gcc/gcc/domwalk.c:195
#6  0x0066982f in move_computations () at /Users/apinski/src/gcc-4.3/gcc/gcc/tree-ssa-loop-im.c:879
#7  0x0066c9de in tree_ssa_lim () at /Users/apinski/src/gcc-4.3/gcc/gcc/tree-ssa-loop-im.c:1647
#8  0x0069e5a8 in tree_ssa_loop_im () at /Users/apinski/src/gcc-4.3/gcc/gcc/tree-ssa-loop.c:113

Comment 5 Andrew Pinski 2008-11-28 20:03:55 UTC
Reduced testcase:
void endian(unsigned short* out, int len)
{
  int i;
  for(i=0;i<len;i++)
  {
    unsigned short x = out[i];
    __asm("rorw $8, %w0" :  "=r" (x) :  "0" (x) :  "cc");
    out[i]=x;
  }
}
Comment 6 Andrew Pinski 2008-11-28 20:04:20 UTC
Since -ftree-parallelize-loops is a new feature closing as fixed for 4.4.0.
Comment 7 Andrew Pinski 2008-12-24 01:09:57 UTC
*** Bug 38356 has been marked as a duplicate of this bug. ***