[Bug tree-optimization/34683] New: compile-time problem with -fstrict-aliasing
jaydub66 at gmail dot com
gcc-bugzilla@gcc.gnu.org
Sat Jan 5 23:51:00 GMT 2008
The attached Fortran file takes unusually long to compile with full
optimization on the latest GCC trunk builds. I tried a lot of the optimization
flags, and found that -fstrict-aliasing seems to trigger the long compile-time.
Without this flag the compile-time is perfectly reasonable, as you can see from
the following numbers (using trunk revision 131325 on i686-pc-linux-gnu,
Pentium M 1,7Ghz and 1GB memory):
-O0: 0.9s
-O1: 4.5s
-O2 -fno-strict-aliasing: 8.0s
-O3 -fno-strict-aliasing: 10.4s
But once I use -fstrict-aliasing, compile-time explodes:
-O1 -fstrict-aliasing: 1m10s
-O2: 2m16s
-O3: 1m43s
(-fstrict-aliasing is included in -O2 and -O3, but not in -O1)
I don't know why -O3 is faster than -O2 here (which seems funny), but anyway
all three numbers are way too large in my opinion. I mean: compile-time rises
by a factor of roughly 15, just due to this one flag! I don't even know what
the flag is supposed to do for this code. Maybe someone can explain this to me?
I didn't examine memory consumption very carefully, but this also seems
unusually high, as a similar file failed to compile on an old machine (with
only 256MB) due to lack of memory(!).
Am I right to assume that something goes wrong here somehow, or can someone
tell me why I should expect this kind of behaviour for this code?
--
Summary: compile-time problem with -fstrict-aliasing
Product: gcc
Version: 4.3.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: tree-optimization
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: jaydub66 at gmail dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34683
More information about the Gcc-bugs
mailing list