This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: mips gcc -O1: Address exception error on store doubleword
- From: Andreas Schwab <schwab at suse dot de>
- To: "Alex Gonzalez" <langabe at gmail dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: Thu, 09 Aug 2007 17:05:26 +0200
- Subject: Re: mips gcc -O1: Address exception error on store doubleword
- References: <c58a7a270708090757p158b302fn3fc996aac9320a1b@mail.gmail.com>
"Alex Gonzalez" <langabe@gmail.com> writes:
> I was under the assumption that the compiler made sure that it doesn't
> store a doubleword that is not aligned on a doubleword boundary. Is
> this a bug in the optimizer?
If the pointers are not correctly aligned for their target type then you
are invoking undefined behaviour. If the aligment of PVAR is at least
doubleword then the compiler may use doubleword accesses for copying.
Andreas.
--
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany
PGP key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."