[GRASSLIST:10636] Re: GRASS 6.1cvs gis.m error - raster/r.le/r.le.setup

Glynn Clements glynn at gclements.plus.com
Tue Feb 28 18:37:21 EST 2006


Maciek Sieczka wrote:

> r.le.setup does not tolerate some GCC optimisation flags. I can see you
> have used -O3, maybe that's the point? Take a look at similar case
> https://intevation.de/rt/webrt?serial_num=4021.
> 
> Glynn,
> 
> Could it be a fault in r.le.setup code?

I'm sure there are ways in which the code could be re-written which
would avoid the error. It's rather hard to find out how, though.

Ultimately, "internal compiler error" means a problem with the
compiler. Even if the code was actually faulty, it's the compiler's
job to identify and report the error.

The line number given for the error (sample.c:994) corresponds to the
definition of overlap(), which is a fairly trivial function; trivial
enough that it's likely to be inlined with -O3. It's called from
within calc_unit_loc() and graph_unit(), both of which are quite
complex, and both use goto.

In particular, both of the calls to overlap() are between the label
and the corresponding goto statement. I suspect that the use of goto
is the most likely issue: goto is trivial to implement in a dumb
compiler, but /really/ problematic for optimising compilers.

-- 
Glynn Clements <glynn at gclements.plus.com>




More information about the grass-user mailing list