[m-dev.] GCC 4.6, 4.7 and parallel grades

Julien Fischer jfischer at opturion.com
Wed Jul 3 13:24:51 AEST 2013

On Wed, 3 Jul 2013, Paul Bone wrote:

>> As a starting point, I suggest looking at the following:
>> Does the problem occur if the program is built with -freorder-functions,
>> but the _init.o file is not?
> I had considered this.  But it's only curiosity at this point as
> -fno-reorder-functions fixes the problem.

It would be more enlightening to know *why* the problem goes away
with -fno-reorder-functions.  (For example, is there something
about that optimisation that is just fundamentally incompatible
with Mercury generated C code, or is this just some silly little
bug in those versions of GCC.)

>> Does the problem occur at lower optimisation levels if
>> -freorder-functions is enabled?
>> Have you tried reproducing the bug in the reg.gar.par or none.gc.par
>> grades?  (That should at least enable you to rule out whether it's an
>> issue with non-local gotos or not.)
> That is my next intended step.
>> Does the problem occur if in a nogc grade, e.g. asm_fast.par?
>> (Is the GC doing something odd?)
> I'll check these out because it'd be good to know why this is happening.


(In the meantime, I don't have a problem with you setting
-fno-reorder-functions by default for Mercury with the affected
versions of GCC.)


More information about the developers mailing list