On Fri, Sep 03, 2010 at 01:06:03AM +0200, Loïc Minier wrote:
> On Thu, Sep 02, 2010, Mariano Alvira wrote:
> > Now, with 4.4 and 4.5, I'm having the following build problem:
> [...]
> > See <file:///usr/share/doc/gcc-4.5/README.Bugs> for instructions.
>
> Ah that's interesting; which exact compiler are you using? Could you
> provide a minimal test case we could reproduce this bug with?
>
> --
> Loïc Minier
Loïc,
Thanks, I've made a minimal test case:
#include <stdint.h>
struct packet {
uint8_t length; /* does not include FCS checksum */
};
typedef struct packet packet_t;
void bad(volatile packet_t *p) {
volatile uint8_t v;
uint8_t i;
i = p->length; /* this one builds fine */
v = p->length; /* this one doesn't */
return;
}
For the problem to appear you must use -Os -march=armv4t and the
volatile assignment. E.g.:
bad:
arm-linux-gnueabi-gcc -Os -march=armv4t -c -o tests.o tests.c
ok:
arm-linux-gnueabi-gcc -march=armv4t -c -o tests.o tests.c
arm-linux-gnueabi-gcc -Os -c -o tests.o tests.c
arm-linux-gnueabi-gcc -c -o tests.o tests.c
For this test I'm using 4.5 from here:
deb
http://people.canonical.com/~hrw/ubuntu-maverick-armel-cross-compilers/
./
$ arm-linux-gnueabi-gcc --version
arm-linux-gnueabi-gcc (Ubuntu/Linaro 4.5.1-2ubuntu2) 4.5.1
I think you'll have the same result with 4.4 from the same place.
Please let me know if there is any other information I can provide to
help!
-Mar.
_______________________________________________
linaro-dev mailing list
[email protected]
http://lists.linaro.org/mailman/listinfo/linaro-dev