[CONFIRMED] gcc-4.8.1 tree-optimization regression

Trying to build your own version of Vega Strike and having problems? Unix users, paste your config.log here (stderr output alone is not helpful).

[CONFIRMED] gcc-4.8.1 tree-optimization regression

Postby ermo » Sat Jul 27, 2013 11:49 am

On fedora19 on my Core 2 Duo E7500, g++ throws an ICE if I set set -march=native -mtune=native and supply both -ffast-math and -ftree-parallelize-loops=2 (from setting CPU_SMP = 2).

As a temporary workaround, I have removed -ffast-math, which allows me to build trunk.

Code: Select all
[ermo@sheila vegastrike]$ gcc --version
gcc (GCC) 4.8.1 20130603 (Red Hat 4.8.1-1)


Klauss advised me to fill in a bug-report with gcc, but I doubt it's worth the hassle tbh.

As an aside, I noticed a few small issues in the root trunk/vegastrike/CMakeLists.txt file:

1./ -ffast-math implies -fassociative-math and -funsafe-math-optimizations, making the latter two redundant (from 'man gcc'):

Code: Select all
-ffast-math
           Sets -fno-math-errno, -funsafe-math-optimizations, -ffinite-math-only,
           -fno-rounding-math, -fno-signaling-nans and -fcx-limited-range.
(...)
-funsafe-math-optimizations
           Enables -fno-signed-zeros, -fno-trapping-math, -fassociative-math and -freciprocal-math.


2./ I can set CPUAMD_k10, but there's no actual optimization settings for that option? Note that the settings below have -ffast-math removed per the above.

Code: Select all
OPTION(CPUAMD_k10  "Enable AMD K10 optimizations (Athlon2)"
    OFF )
(...)
IF(CPUAMD_k8)
    SET(CPU_OPTS "-mtune=athlon64 -mfpmath=sse -msse2 -mmmx -m3dnow -ftree-vectorize -fprefetch-loop-arrays ")
ELSEIF(CPUAMD_K9)
    SET(CPU_OPTS "-mtune=k8-sse3 -mfpmath=sse -msse3 -mmmx -m3dnow -ftree-vectorize -funroll-loops ")
ELSEIF(CPUINTEL_p4)
    SET(CPU_OPTS "-mtune=pentium4 -mfpmath=sse -msse2 -mmmx -ftree-vectorize -funroll-loops ")
(...)
Attachments
CMakeCache.txt
I assume that CMakeCache.txt is the equivalent of config.log? =)
(53.09 KiB) Downloaded 93 times
Last edited by ermo on Sun Jul 28, 2013 8:53 am, edited 1 time in total.
Privateer: Wing Commander Universe -- the continuation of chuck_starchaser's Privateer: Parallel Universe mod.
ermo
Mercenary
Mercenary
 
Posts: 104
Topics: 5
Joined: Tue Oct 30, 2012 12:46 pm

Share On:

Share on Facebook Facebook Share on Twitter Twitter Share on Digg Digg

Re: gcc-4.8.1 ICEs w/ -ffast-math -ftree-parallelize-loops=2

Postby klauss » Sat Jul 27, 2013 2:09 pm

ermo wrote:Klauss advised me to fill in a bug-report with gcc, but I doubt it's worth the hassle tbh.

Well, depends on how much hassle it would be for you. But you already did a lot of the hard work, it's just about filling a bug report.

I can do it myself if you're still not up for it, but you're actually the ideal candidate since you can reproduce it easily.
Oíd mortales, el grito sagrado...
Call me "Menes, lord of Cats"
Wing Commander Universe
User avatar
klauss
Elite
Elite
 
Posts: 7243
Topics: 55
Joined: Mon Apr 18, 2005 7:40 am
Location: LS87, Buenos Aires, República Argentina

Re: gcc-4.8.1 ICEs w/ -ffast-math -ftree-parallelize-loops=2

Postby ermo » Sat Jul 27, 2013 2:54 pm

Bug submitted (for all the good it'll do):

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58006

8)
Privateer: Wing Commander Universe -- the continuation of chuck_starchaser's Privateer: Parallel Universe mod.
ermo
Mercenary
Mercenary
 
Posts: 104
Topics: 5
Joined: Tue Oct 30, 2012 12:46 pm

Re: gcc-4.8.1 ICEs w/ -ffast-math -ftree-parallelize-loops=2

Postby ermo » Sun Jul 28, 2013 8:52 am

Well, what do you know; Marc Glisse has taken the time to reproduce the issue and have created a minimal repro case, making this an official GCC 4.8/4.9 tree-optimization regression.

I'm quite surprised that they'd take it seriously, really. :)
Privateer: Wing Commander Universe -- the continuation of chuck_starchaser's Privateer: Parallel Universe mod.
ermo
Mercenary
Mercenary
 
Posts: 104
Topics: 5
Joined: Tue Oct 30, 2012 12:46 pm

Re: [CONFIRMED] gcc-4.8.1 tree-optimization regression

Postby klauss » Sun Jul 28, 2013 11:12 am

:D

Cool. That means they'll fix it soonish.
Oíd mortales, el grito sagrado...
Call me "Menes, lord of Cats"
Wing Commander Universe
User avatar
klauss
Elite
Elite
 
Posts: 7243
Topics: 55
Joined: Mon Apr 18, 2005 7:40 am
Location: LS87, Buenos Aires, República Argentina

Re: [CONFIRMED] gcc-4.8.1 tree-optimization regression

Postby gonzo » Tue Aug 27, 2013 7:48 pm

Status: RESOLVED FIXED

8)
There are 10 types of people in this world, those who understand binary and those who don't.
gonzo
Bounty Hunter
Bounty Hunter
 
Posts: 206
Topics: 23
Joined: Wed Oct 20, 2010 8:50 am
Location: Kungälv, Sweden

Re: [CONFIRMED] gcc-4.8.1 tree-optimization regression

Postby klauss » Mon Sep 02, 2013 10:11 am

Nicely done :)

PS: Yeap, I've been offline for a while
Oíd mortales, el grito sagrado...
Call me "Menes, lord of Cats"
Wing Commander Universe
User avatar
klauss
Elite
Elite
 
Posts: 7243
Topics: 55
Joined: Mon Apr 18, 2005 7:40 am
Location: LS87, Buenos Aires, República Argentina

Re: [CONFIRMED] gcc-4.8.1 tree-optimization regression

Postby blackrose » Fri Oct 11, 2013 1:56 am

*SNIP*
Last edited by pheonixstorm on Fri Oct 11, 2013 9:38 am, edited 1 time in total.
Reason: Repost of something klauss wrote, possible spambot.
blackrose
Atmospheric Pilot
Atmospheric Pilot
 
Posts: 1
Joined: Fri Oct 11, 2013 12:37 am



Return to Compiling Problems [paste config.log]

Who is online

Users browsing this forum: No registered users and 2 guests

cron