[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: arm gcc 4.1.3 -O2 dead code removal breaks configure test

From: Ralf Wildenhues
Subject: Re: arm gcc 4.1.3 -O2 dead code removal breaks configure test
Date: Wed, 30 Mar 2011 07:08:04 +0200
User-agent: Mutt/1.5.20 (2010-08-04)

Hello Andrew,

* Andrew W. Nosenko wrote on Wed, Mar 30, 2011 at 02:01:45AM CEST:
> On Tue, Mar 29, 2011 at 20:18, Ralf Wildenhues wrote:
> >
> > In order to be absolutely sure that the compiler can't optimize away the
> > reference, I'd say you need to modify external state depending on it.
> > Typically, you can do that by printing its contents, or, if those aren't
> > well-defined (so the compiler might warn about that), its address (with
> > %lu and cast to unsigned long, for portability).  Of course this means
> > the test needs to include AC_INCLUDES_DEFAULT in the test header, for
> > stdio.h.  The latter means you can then drop including sys/types another
> > time.
> IMHO, better would to be just disable a compiler to do optimization
> dances around 'in6' variable (i.e. mark 'in6' as 'volatile'):

Ah yes, that sounds simpler.

I've been too preoccupied with Fortran again lately, it seems.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]