Bug 41562 - ICE with -O1 -ftree-loop-distribution -floop-block
Summary: ICE with -O1 -ftree-loop-distribution -floop-block
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: tree-optimization (show other bugs)
Version: 4.4.1
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-10-03 22:26 UTC by Ryan Hill
Modified: 2010-12-07 01:29 UTC (History)
2 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments
minimal testcase (274 bytes, text/plain)
2009-10-03 22:29 UTC, Ryan Hill
Details
original preprocessed source (10.22 KB, text/plain)
2009-10-03 22:31 UTC, Ryan Hill
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ryan Hill 2009-10-03 22:26:33 UTC
one of our more ambitious users discovered an ICE while building libmsn with -O1 -ftree-loop-distribution -floop-block.  dropping any one of these flags makes it go away.  i'll attach a reduced testcase which i believe is invalid code but still ICEs, and the original preprocessed sources.  i also reproduced the error with a recent 4.4 branch checkout (-r152264).

$ gcc -v
Using built-in specs.
Target: x86_64-unknown-linux-gnu
Configured with: /var/tmp/portage/sys-devel/gcc-4.4.1/work/gcc-4.4.1/configure --prefix=/usr --bindir=/usr/x86_64-unknown-linux-gnu/gcc-bin/4.4.1 --includedir=/usr/lib/gcc/x86_64-unknown-linux-gnu/4.4.1/include --datadir=/usr/share/gcc-data/x86_64-unknown-linux-gnu/4.4.1 --mandir=/usr/share/gcc-data/x86_64-unknown-linux-gnu/4.4.1/man --infodir=/usr/share/gcc-data/x86_64-unknown-linux-gnu/4.4.1/info --with-gxx-include-dir=/usr/lib/gcc/x86_64-unknown-linux-gnu/4.4.1/include/g++-v4 --host=x86_64-unknown-linux-gnu --build=x86_64-unknown-linux-gnu --disable-altivec --disable-fixed-point --with-ppl --with-cloog --disable-nls --with-system-zlib --disable-checking --disable-werror --enable-secureplt --enable-multilib --disable-libmudflap --disable-libssp --enable-libgomp --enable-cld --with-python-dir=/share/gcc-data/x86_64-unknown-linux-gnu/4.4.1/python --disable-libgcj --enable-languages=c,c++ --enable-shared --enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu --with-bugurl=http://bugs.gentoo.org/ --with-pkgversion='Gentoo 4.4.1 p1.0'
Thread model: posix
gcc version 4.4.1 (Gentoo 4.4.1 p1.0)
Comment 1 Ryan Hill 2009-10-03 22:29:19 UTC
Created attachment 18697 [details]
minimal testcase

$ x86_64-unknown-linux-gnu-gcc-4.4.1  -O1 -Wall -ftree-loop-distribution -floop-block bug287159-min.ii bug287159-min.ii: In function 'int Siren7_EncodeFrame(stSirenEncoder*, unsigned char*, unsigned char*)':
bug287159-min.ii:17: warning: control reaches end of non-void function
bug287159-min.ii:5: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
Comment 2 Ryan Hill 2009-10-03 22:31:16 UTC
Created attachment 18698 [details]
original preprocessed source

requires -O2 to ICE.
Comment 3 Sebastian Pop 2010-12-07 00:26:00 UTC
This was fixed on trunk 
http://gcc.gnu.org/viewcvs?view=revision&revision=145494
Comment 4 hjl@gcc.gnu.org 2010-12-07 01:29:14 UTC
Author: hjl
Date: Tue Dec  7 01:29:10 2010
New Revision: 167527

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=167527
Log:
Add testcases for PRs middle-end/41562 and middle-end/46185.

2010-12-06  H.J. Lu  <hongjiu.lu@intel.com>

	PR middle-end/41562
	* g++.dg/graphite/pr41562.C: New.

	PR middle-end/46185
	* gcc.dg/graphite/pr46185.c: New.

Added:
    trunk/gcc/testsuite/g++.dg/graphite/pr41562.C
    trunk/gcc/testsuite/gcc.dg/graphite/pr46185.c
Modified:
    trunk/gcc/testsuite/ChangeLog