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

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

 



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.

Thanks,
Ralf

_______________________________________________
Autoconf mailing list
Autoconf@xxxxxxx
http://lists.gnu.org/mailman/listinfo/autoconf


[Index of Archives]     [GCC Help]     [Kernel Discussion]     [RPM Discussion]     [Red Hat Development]     [Yosemite News]     [Linux USB]     [Samba]

  Powered by Linux