This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/27363] ARM gcc 4.1 optimization bug
- From: "dirk dot behme at googlemail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 12 Jun 2006 15:34:48 -0000
- Subject: [Bug target/27363] ARM gcc 4.1 optimization bug
- References: <bug-27363-12620@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #7 from dirk dot behme at googlemail dot com 2006-06-12 15:34 -------
Until a fix for this bug is found, there are two possible workarounds:
- Compile kernels sound system as modules and compile these modules with -O1
instead of default -Os or -O2 (e.g. by changing main Makefile).
- Use this patch from Fengwei Yin <yfw.debian@gmail.com> (then -Os or -O2
should work):
-- linux/include/sound/pcm_params.h 2005-03-02 09:31:53.000000000 +0800
+++ linux-ok/include/sound/pcm_params.h 2006-06-08 09:57:11.000000000 +0800
@@ -196,6 +196,11 @@ INLINE int snd_mask_refine(snd_mask_t *m
snd_mask_t old;
assert(!snd_mask_empty(mask));
snd_mask_copy(&old, mask);
+ /*
+ * add the barrier to fix the optimization
+ * error of GCC 4.1
+ */
+ mb();
snd_mask_intersect(mask, v);
if (snd_mask_empty(mask))
return -EINVAL;
Note that this is only a workaround. It will drop the Alsa subsystem
performance.
--
dirk dot behme at googlemail dot com changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |dirk dot behme at googlemail
| |dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27363