http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50875
Bug #: 50875
Summary: O3 and -march=native lead to internal compiler error:
in find_reloads
Classification: Unclassified
Product: gcc
Version: 4.6.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: fortran
AssignedTo: [email protected]
ReportedBy: [email protected]
Created attachment 25618
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=25618
Stripped down test case.
It appears that for certain combinations of array allocations, conditionals and
loops, gfortran 4.6 and 4.7 give :
"internal compiler error: in find_reloads, at reload.c:4067",
but only when paired with -O3 and -march=native.
Tried compiling against 4.6.1 and 4.7.0 20111010 (experimental) [trunk revision
179769]. It works against 4.4.6 and 4.5.4.
I tried on two Sandy-Bridge systems, an i7 with Scientific Linux and an i5 with
Ubuntu 11.10 and Mac OS X (Only tried 4.6 on this platform), which all gave the
same behaviour.
I have attached a completely stripped down test case (doesn't do anything
meaningful) which works against 4.5 and 4.4 but not later versions for the
described flags. The output of this when compiled against the earlier versions
is:
(-6.6689347635125245, -3.4315183934768561)
(-0.21071909368227187,-0.21353560926074711)
(-2.3118973846843422, -1.1895930430719770)
(-3.7929436862808936,-3.8436409666934486).
NB. spaces stripped out.
For the moment, I am working around this by compiling the offending module with
-O2, which works.
Hope this helps, if you need any more information, please ask.
Regards,
Joly.