From: Reinhard Meyer <reinhard.meyer@emk-elektronik.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] Bug in TOP860 code with gcc 4.8.1
Date: Tue, 14 Jan 2014 12:33:43 +0100 [thread overview]
Message-ID: <52D52097.6050001@emk-elektronik.de> (raw)
In-Reply-To: <20140113210446.903E33821F4@gemini.denx.de>
Dear Wolfgang,
> Dear Reinhard,
>
> attempting to build the TOP860 code with a GCC 4.8.1 based tool chain
> (say ELDK v5.5 or Yocto 1.5) gives the following errors:
>
> -> ./MAKEALL TOP860
> Configuring for TOP860 board...
> text data bss dec hex filename
> 165471 21020 17316 203807 31c1f ./u-boot
> ../common/flash.c: In function 'flash_init':
> ../common/flash.c:336:20: warning: iteration 128u invokes undefined behavior [-Waggressive-loop-optimizations]
> info->start[i] = (ulong)addr + 0x10000 * i;
> ^
> ../common/flash.c:334:4: note: containing loop
> for (i = 0; i < info->sector_count; i++)
> ^
> ...
>
> Can you please provide a fix - or is this old hardware and the code
> should be removed from the U-Boot tree?
1. on first and second glance I cannot see where this (simple!!) loop
might "invoke undefined behaviour". Seems like a compiler/optimizer bug
to me...
2. should not the same issue arise with TOP5200 (using the same flash.c) ??
3. nevertheless TOP860 can be removed.
Best Regards,
Reinhard
next prev parent reply other threads:[~2014-01-14 11:33 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-13 21:04 [U-Boot] Bug in TOP860 code with gcc 4.8.1 Wolfgang Denk
2014-01-14 11:33 ` Reinhard Meyer [this message]
2014-01-14 17:56 ` Jeroen Hofstee
2014-01-15 9:08 ` Reinhard Meyer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=52D52097.6050001@emk-elektronik.de \
--to=reinhard.meyer@emk-elektronik.de \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.